From 1796abcbcde83996b6b0da6ff5fa85f682b29e21 Mon Sep 17 00:00:00 2001 From: Artak Mkrtchyan Date: Thu, 22 Feb 2018 17:07:52 -0800 Subject: [PATCH] Updated the test TagHelperBlockRewriteTest class --- .../Legacy/TagHelperBlockRewriterTest.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs index 9b2adc4d07..88c774c93c 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs @@ -2950,7 +2950,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy intType), RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey( new SourceSpan(7, 0, 7, 11), - "int-prefix-", + "int-prefix-", "input"), } }, @@ -2973,7 +2973,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy stringType), RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey( new SourceSpan(7, 0, 7, 14), - "string-prefix-", + "string-prefix-", "input"), } }, @@ -3638,7 +3638,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy RazorDiagnosticFactory.CreateTagHelper_EmptyBoundAttribute( new SourceSpan(7, 0, 7, 21), "bound-required-string", - "input", + "input", stringType), } }, @@ -3962,7 +3962,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy .Build(), }; - var featureFlags = new TestRazorParserFeatureFlags(allowMinimizedBooleanTagHelperAttributes: false); + var featureFlags = new TestRazorParserFeatureFlags(allowMinimizedBooleanTagHelperAttributes: false, allowHtmlCommentsInTagHelper: false); var expectedOutput = new MarkupBlock( new MarkupTagHelperBlock( @@ -3994,12 +3994,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy private class TestRazorParserFeatureFlags : RazorParserFeatureFlags { - public TestRazorParserFeatureFlags(bool allowMinimizedBooleanTagHelperAttributes) + public TestRazorParserFeatureFlags(bool allowMinimizedBooleanTagHelperAttributes, bool allowHtmlCommentsInTagHelper) { AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes; + AllowHtmlCommentsInTagHelpers = allowHtmlCommentsInTagHelper; } public override bool AllowMinimizedBooleanTagHelperAttributes { get; } + + public override bool AllowHtmlCommentsInTagHelpers { get; } } } }