Setting TokenKind for RazorIRToken

This commit is contained in:
Ajay Bhargav Baaskaran 2017-03-31 14:48:38 -07:00
parent a784265747
commit a74cda4402
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
RazorIRBuilder.Create(statement)
.Add(new RazorIRToken()
{
Kind = RazorIRToken.TokenKind.CSharp,
Content = writer.Builder.ToString()
});

View File

@ -122,6 +122,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
",
tokenNode.Content,
ignoreLineEndingDifferences: true);
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
}
[Fact]
@ -194,6 +195,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
",
tokenNode.Content,
ignoreLineEndingDifferences: true);
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
}
[Fact]
@ -278,6 +280,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
",
tokenNode.Content,
ignoreLineEndingDifferences: true);
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
}
private RazorCodeDocument CreateDocument(string content)