From fec565bf4d45f51a9f2721d4673f2790469ea155 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 27 Apr 2018 12:19:03 -0700 Subject: [PATCH] Add AngularTemplate --- .../Templates/AngularTemplate.cs | 22 +++++++++++++++++++ AspNetCoreSdkTests/Templates/MvcTemplate.cs | 4 ++++ .../Templates/RazorApplicationBaseTemplate.cs | 4 ---- AspNetCoreSdkTests/Templates/RazorTemplate.cs | 4 ++++ AspNetCoreSdkTests/Templates/TemplateData.cs | 9 +++++--- 5 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 AspNetCoreSdkTests/Templates/AngularTemplate.cs diff --git a/AspNetCoreSdkTests/Templates/AngularTemplate.cs b/AspNetCoreSdkTests/Templates/AngularTemplate.cs new file mode 100644 index 0000000000..a4e6a17881 --- /dev/null +++ b/AspNetCoreSdkTests/Templates/AngularTemplate.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AspNetCoreSdkTests.Templates +{ + public class AngularTemplate : RazorApplicationBaseTemplate + { + public new static AngularTemplate Instance { get; } = new AngularTemplate(); + + protected AngularTemplate() { } + + public override string Name => "angular"; + + protected override string RazorPath => "Pages"; + + public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] + { + Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"), + }.Select(p => Path.Combine(OutputPath, p))); + } +} diff --git a/AspNetCoreSdkTests/Templates/MvcTemplate.cs b/AspNetCoreSdkTests/Templates/MvcTemplate.cs index a32e522940..dae7851d13 100644 --- a/AspNetCoreSdkTests/Templates/MvcTemplate.cs +++ b/AspNetCoreSdkTests/Templates/MvcTemplate.cs @@ -16,10 +16,14 @@ namespace AspNetCoreSdkTests.Templates public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] { + Path.Combine("Razor", RazorPath, "_ViewStart.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Home", "About.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Home", "Contact.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Home", "Index.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Home", "Privacy.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_CookieConsentPartial.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_Layout.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_ValidationScriptsPartial.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Shared", "Error.g.cshtml.cs"), }.Select(p => Path.Combine(OutputPath, p))); } diff --git a/AspNetCoreSdkTests/Templates/RazorApplicationBaseTemplate.cs b/AspNetCoreSdkTests/Templates/RazorApplicationBaseTemplate.cs index 7526c0a0f3..520df95795 100644 --- a/AspNetCoreSdkTests/Templates/RazorApplicationBaseTemplate.cs +++ b/AspNetCoreSdkTests/Templates/RazorApplicationBaseTemplate.cs @@ -15,10 +15,6 @@ namespace AspNetCoreSdkTests.Templates public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] { Path.Combine("Razor", RazorPath, "_ViewImports.g.cshtml.cs"), - Path.Combine("Razor", RazorPath, "_ViewStart.g.cshtml.cs"), - Path.Combine("Razor", RazorPath, "Shared", "_CookieConsentPartial.g.cshtml.cs"), - Path.Combine("Razor", RazorPath, "Shared", "_Layout.g.cshtml.cs"), - Path.Combine("Razor", RazorPath, "Shared", "_ValidationScriptsPartial.g.cshtml.cs"), }.Select(p => Path.Combine(OutputPath, p))); public override IEnumerable ExpectedBinFilesAfterBuild => Enumerable.Concat(base.ExpectedBinFilesAfterBuild, new[] diff --git a/AspNetCoreSdkTests/Templates/RazorTemplate.cs b/AspNetCoreSdkTests/Templates/RazorTemplate.cs index bc50de40dc..afb798924a 100644 --- a/AspNetCoreSdkTests/Templates/RazorTemplate.cs +++ b/AspNetCoreSdkTests/Templates/RazorTemplate.cs @@ -16,11 +16,15 @@ namespace AspNetCoreSdkTests.Templates public override IEnumerable ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[] { + Path.Combine("Razor", RazorPath, "_ViewStart.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "About.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Contact.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Index.g.cshtml.cs"), Path.Combine("Razor", RazorPath, "Privacy.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_CookieConsentPartial.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_Layout.g.cshtml.cs"), + Path.Combine("Razor", RazorPath, "Shared", "_ValidationScriptsPartial.g.cshtml.cs"), }.Select(p => Path.Combine(OutputPath, p))); } } diff --git a/AspNetCoreSdkTests/Templates/TemplateData.cs b/AspNetCoreSdkTests/Templates/TemplateData.cs index b2ef37b804..3b75c490a2 100644 --- a/AspNetCoreSdkTests/Templates/TemplateData.cs +++ b/AspNetCoreSdkTests/Templates/TemplateData.cs @@ -9,13 +9,14 @@ namespace AspNetCoreSdkTests.Templates { private static IEnumerable