diff --git a/AspNetCoreSdkTests/Templates/RazorTemplate.cs b/AspNetCoreSdkTests/Templates/RazorTemplate.cs new file mode 100644 index 0000000000..109f662dea --- /dev/null +++ b/AspNetCoreSdkTests/Templates/RazorTemplate.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AspNetCoreSdkTests.Templates +{ + public class RazorTemplate : WebTemplate + { + public override string Name => "razor"; + + public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] + { + $"{Name}.RazorCoreGenerate.cache", + $"{Name}.RazorTargetAssemblyInfo.cs", + $"{Name}.TagHelpers.input.cache", + $"{Name}.TagHelpers.output.cache", + $"{Name}.Views.dll", + $"{Name}.Views.pdb", + Path.Combine("Razor", "Pages", "_ViewImports.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "_ViewStart.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "About.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Contact.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Error.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Index.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Privacy.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Shared", "_CookieConsentPartial.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Shared", "_Layout.g.cshtml.cs"), + Path.Combine("Razor", "Pages", "Shared", "_ValidationScriptsPartial.g.cshtml.cs"), + }.Select(p => Path.Combine(OutputPath, p))); + + public override IEnumerable ExpectedBinFilesAfterBuild => Enumerable.Concat(base.ExpectedBinFilesAfterBuild, new[] + { + $"{Name}.Views.dll", + $"{Name}.Views.pdb", + }.Select(p => Path.Combine(OutputPath, p))); + } +} diff --git a/AspNetCoreSdkTests/Templates/TemplateData.cs b/AspNetCoreSdkTests/Templates/TemplateData.cs index a9b3aaf43f..a134c5707e 100644 --- a/AspNetCoreSdkTests/Templates/TemplateData.cs +++ b/AspNetCoreSdkTests/Templates/TemplateData.cs @@ -9,6 +9,7 @@ namespace AspNetCoreSdkTests.Templates new ClassLibraryTemplate(), new ConsoleApplicationTemplate(), new WebTemplate(), + new RazorTemplate(), }; } } diff --git a/AspNetCoreSdkTests/Templates/WebTemplate.cs b/AspNetCoreSdkTests/Templates/WebTemplate.cs index fbffa38594..42b75734b3 100644 --- a/AspNetCoreSdkTests/Templates/WebTemplate.cs +++ b/AspNetCoreSdkTests/Templates/WebTemplate.cs @@ -8,14 +8,11 @@ namespace AspNetCoreSdkTests.Templates { public override string Name => "web"; - public override TemplateType Type => TemplateType.Application; - public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] { $"{Name}.RazorAssemblyInfo.cache", $"{Name}.RazorAssemblyInfo.cs", $"{Name}.RazorTargetAssemblyInfo.cache", }.Select(p => Path.Combine(OutputPath, p))); - } }