Пример #1
0
 public void ParseBlockWithHelperDirectiveProducesError()
 {
     ParseBlockTest("@helper fooHelper { }",
                    new ExpressionBlock(
                        Factory.CodeTransition(),
                        Factory.Code("helper")
                        .AsImplicitExpression(KeywordSet)
                        .Accepts(AcceptedCharactersInternal.NonWhiteSpace)),
                    new RazorError(
                        LegacyResources.FormatParseError_HelperDirectiveNotAvailable(SyntaxConstants.CSharp.HelperKeyword),
                        new SourceLocation(1, 0, 1),
                        length: 6));
 }