Add AngularTemplate
This commit is contained in:
parent
6db0dc7db0
commit
fec565bf4d
|
|
@ -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<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
||||||
|
{
|
||||||
|
Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"),
|
||||||
|
}.Select(p => Path.Combine(OutputPath, p)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,10 +16,14 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
|
|
||||||
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
public override IEnumerable<string> 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", "About.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Home", "Contact.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", "Index.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Home", "Privacy.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"),
|
Path.Combine("Razor", RazorPath, "Shared", "Error.g.cshtml.cs"),
|
||||||
}.Select(p => Path.Combine(OutputPath, p)));
|
}.Select(p => Path.Combine(OutputPath, p)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,6 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
||||||
{
|
{
|
||||||
Path.Combine("Razor", RazorPath, "_ViewImports.g.cshtml.cs"),
|
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)));
|
}.Select(p => Path.Combine(OutputPath, p)));
|
||||||
|
|
||||||
public override IEnumerable<string> ExpectedBinFilesAfterBuild => Enumerable.Concat(base.ExpectedBinFilesAfterBuild, new[]
|
public override IEnumerable<string> ExpectedBinFilesAfterBuild => Enumerable.Concat(base.ExpectedBinFilesAfterBuild, new[]
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,15 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
|
|
||||||
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
public override IEnumerable<string> 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, "About.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Contact.g.cshtml.cs"),
|
Path.Combine("Razor", RazorPath, "Contact.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"),
|
Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Index.g.cshtml.cs"),
|
Path.Combine("Razor", RazorPath, "Index.g.cshtml.cs"),
|
||||||
Path.Combine("Razor", RazorPath, "Privacy.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)));
|
}.Select(p => Path.Combine(OutputPath, p)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,14 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
{
|
{
|
||||||
private static IEnumerable<Template> Templates { get; } = new Template[]
|
private static IEnumerable<Template> Templates { get; } = new Template[]
|
||||||
{
|
{
|
||||||
ClassLibraryTemplate.Instance,
|
|
||||||
ConsoleApplicationTemplate.Instance,
|
ConsoleApplicationTemplate.Instance,
|
||||||
|
ClassLibraryTemplate.Instance,
|
||||||
WebTemplate.Instance,
|
WebTemplate.Instance,
|
||||||
RazorTemplate.Instance,
|
|
||||||
MvcTemplate.Instance,
|
MvcTemplate.Instance,
|
||||||
WebApiTemplate.Instance,
|
RazorTemplate.Instance,
|
||||||
|
AngularTemplate.Instance,
|
||||||
RazorClassLibraryTemplate.Instance,
|
RazorClassLibraryTemplate.Instance,
|
||||||
|
WebApiTemplate.Instance,
|
||||||
};
|
};
|
||||||
|
|
||||||
private static IEnumerable<NuGetConfig> NuGetConfigs { get; } = Enum.GetValues(typeof(NuGetConfig)).Cast<NuGetConfig>();
|
private static IEnumerable<NuGetConfig> NuGetConfigs { get; } = Enum.GetValues(typeof(NuGetConfig)).Cast<NuGetConfig>();
|
||||||
|
|
@ -23,6 +24,8 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
private static IEnumerable<TestCaseData> All { get; } =
|
private static IEnumerable<TestCaseData> All { get; } =
|
||||||
from t in Templates
|
from t in Templates
|
||||||
from c in NuGetConfigs
|
from c in NuGetConfigs
|
||||||
|
// Exclude the DotNetCore NuGet.config scenarios unless temporarily required to make tests pass
|
||||||
|
where c != NuGetConfig.DotNetCore
|
||||||
select new TestCaseData(t, c);
|
select new TestCaseData(t, c);
|
||||||
|
|
||||||
private static IEnumerable<TestCaseData> IgnoreRazorClassLibEmpty { get; } =
|
private static IEnumerable<TestCaseData> IgnoreRazorClassLibEmpty { get; } =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue