Test cleanup for component tests

This code all got dumped here during the port. This change deletes tests
that have already **moved** to the aspnet/AspNetCore repo.

Also fixed the markup rewriter tests for components.
\n\nCommit migrated from 86cc904004
This commit is contained in:
Ryan Nowak 2019-01-01 21:55:02 -08:00
parent 74d56ce024
commit 583113686c
2 changed files with 8 additions and 16 deletions

View File

@ -88,19 +88,21 @@ namespace Microsoft.AspNetCore.Razor.Language
return CreateCodeDocumentCore(sourceDocument, projectItem.FileKind, importSourceDocuments, tagHelpers: null, configureParser, configureCodeGeneration); return CreateCodeDocumentCore(sourceDocument, projectItem.FileKind, importSourceDocuments, tagHelpers: null, configureParser, configureCodeGeneration);
} }
protected RazorCodeDocument CreateCodeDocumentCore( protected internal RazorCodeDocument CreateCodeDocumentCore(
RazorSourceDocument sourceDocument, RazorSourceDocument sourceDocument,
string fileKind, string fileKind = null,
IReadOnlyList<RazorSourceDocument> importSourceDocuments, IReadOnlyList<RazorSourceDocument> importSourceDocuments = null,
IReadOnlyList<TagHelperDescriptor> tagHelpers, IReadOnlyList<TagHelperDescriptor> tagHelpers = null,
Action<RazorParserOptionsBuilder> configureParser, Action<RazorParserOptionsBuilder> configureParser = null,
Action<RazorCodeGenerationOptionsBuilder> configureCodeGeneration) Action<RazorCodeGenerationOptionsBuilder> configureCodeGeneration = null)
{ {
if (sourceDocument == null) if (sourceDocument == null)
{ {
throw new ArgumentNullException(nameof(sourceDocument)); throw new ArgumentNullException(nameof(sourceDocument));
} }
importSourceDocuments = importSourceDocuments ?? Array.Empty<RazorSourceDocument>();
var parserOptions = GetRequiredFeature<IRazorParserOptionsFactoryProjectFeature>().Create(fileKind, builder => var parserOptions = GetRequiredFeature<IRazorParserOptionsFactoryProjectFeature>().Create(fileKind, builder =>
{ {
ConfigureParserOptions(builder); ConfigureParserOptions(builder);

View File

@ -348,16 +348,6 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
protected static string FullTypeName<T>() => typeof(T).FullName.Replace('+', '.'); protected static string FullTypeName<T>() => typeof(T).FullName.Replace('+', '.');
protected RenderTreeFrame[] GetRenderTree(IComponent component)
{
throw null;
}
protected RenderTreeFrame[] GetFrames(RenderFragment fragment)
{
throw null;
}
protected static void AssertSourceEquals(string expected, CompileToCSharpResult generated) protected static void AssertSourceEquals(string expected, CompileToCSharpResult generated)
{ {
// Normalize the paths inside the expected result to match the OS paths // Normalize the paths inside the expected result to match the OS paths