Addresses  #429 and #378
This commit is contained in:
Jass Bagga 2018-04-03 10:36:06 -07:00 коммит произвёл GitHub
Родитель f52359d202
Коммит 0a5a963bb0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 47 добавлений и 11 удалений

Просмотреть файл

@ -28,6 +28,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{342602FC-9
test\TemplateTests.props.in = test\TemplateTests.props.in
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolsInstaller", "test\DotNetToolsInstaller\DotNetToolsInstaller.csproj", "{61F386CF-4356-4B7E-8A98-F09759E65AC9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -54,6 +56,10 @@ Global
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Release|Any CPU.Build.0 = Release|Any CPU
{61F386CF-4356-4B7E-8A98-F09759E65AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61F386CF-4356-4B7E-8A98-F09759E65AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61F386CF-4356-4B7E-8A98-F09759E65AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61F386CF-4356-4B7E-8A98-F09759E65AC9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -64,6 +70,7 @@ Global
{402E62D1-7FD0-4E07-812C-0E385D98D6D9} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
{1731F6D9-1DFC-49D6-8F28-471194B1962C} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
{260EBA09-DEF5-429C-99BF-90CA1456A576} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
{61F386CF-4356-4B7E-8A98-F09759E65AC9} = {342602FC-9FF3-448D-B12D-F0E91B23DBBF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E9B27B0D-4F85-431B-9C26-80CFE4393D36}

Просмотреть файл

@ -4,6 +4,7 @@
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview2-15768</InternalAspNetCoreSdkPackageVersion>
<DotNetEfPackageVersion>2.1.0-preview2-30504</DotNetEfPackageVersion>
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview2-30504</MicrosoftAspNetCoreAllPackageVersion>
<MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion>2.1.0-preview2-30504</MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion>
<MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion>2.1.0-preview2-30504</MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion>

Просмотреть файл

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RestoreProjectStyle>DotnetToolReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkPackageVersion)" />
<PackageReference Include="dotnet-ef" Version="$(DotNetEfPackageVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -19,7 +19,7 @@ namespace Templates.Test
[Theory]
[InlineData("Microsoft.DotNet.Web.ProjectTemplates")]
[InlineData("Microsoft.DotNet.Web.Spa.ProjectTemplates")]
public void CheckForByteOrderMarkSpaTemplates(string projectType)
public void CheckForByteOrderMark_InJsonFiles_ForAllTemplates(string projectType)
{
var currentDirectory = Directory.GetCurrentDirectory();
var repositoryPath = Directory.GetParent(currentDirectory).Parent.Parent.Parent.Parent.FullName;

Просмотреть файл

@ -132,7 +132,13 @@ $@"<Project>
protected void RunDotNetEfCreateMigration(string migrationName)
{
var args = $"ef migrations add {migrationName}";
var assembly = typeof(TemplateTestBase).Assembly;
var dotNetEfFullPath = assembly.GetCustomAttributes<AssemblyMetadataAttribute>()
.First(attribute => attribute.Key == "DotNetEfFullPath")
.Value;
var args = $"\"{dotNetEfFullPath}\" migrations add {migrationName}";
// Only run one instance of 'dotnet new' at once, as a workaround for
// https://github.com/aspnet/templating/issues/63

Просмотреть файл

@ -81,21 +81,21 @@ namespace Templates.Test
}
}
[ConditionalFact(Skip = "https://github.com/aspnet/templating/issues/378")]
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
public void MvcTemplate_IndividualAuth_Works_NetFramework()
=> MvcTemplate_IndividualAuthImpl("net461");
[ConditionalFact(Skip = "https://github.com/aspnet/templating/issues/378")]
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
public void MvcTemplate_WithIndividualAuth_NoHttpsSetToTrue_UsesHttps_NetFramework()
=> MvcTemplate_IndividualAuthImpl("net461", false, true);
[Fact(Skip = "https://github.com/aspnet/templating/issues/378")]
[Fact]
public void MvcTemplate_IndividualAuth_Works_NetCore()
=> MvcTemplate_IndividualAuthImpl(null);
[Fact(Skip = "https://github.com/aspnet/templating/issues/378")]
[Fact]
public void MvcTemplate_IndividualAuth_UsingLocalDB_Works_NetCore()
=> MvcTemplate_IndividualAuthImpl(null, true);

Просмотреть файл

@ -63,21 +63,21 @@ namespace Templates.Test
}
}
[ConditionalFact(Skip = "https://github.com/aspnet/templating/issues/378")]
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
public void RazorPagesTemplate_IndividualAuth_Works_NetFramework()
=> RazorPagesTemplate_IndividualAuthImpl("net461");
[ConditionalFact(Skip = "https://github.com/aspnet/templating/issues/378")]
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
public void RazorPagesTemplate_WithIndividualAuth_NoHttpsSetToTrue_UsesHttps_NetFramework()
=> RazorPagesTemplate_IndividualAuthImpl("net461", false, true);
[Fact(Skip = "https://github.com/aspnet/templating/issues/378")]
[Fact]
public void RazorPagesTemplate_IndividualAuth_Works_NetCore()
=> RazorPagesTemplate_IndividualAuthImpl(null);
[Fact(Skip = "https://github.com/aspnet/templating/issues/378")]
[Fact]
public void RazorPagesTemplate_IndividualAuth_UsingLocalDB_Works_NetCore()
=> RazorPagesTemplate_IndividualAuthImpl(null, true);

Просмотреть файл

@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DefineConstants>$(DefineConstants);XPLAT</DefineConstants>
@ -26,4 +25,15 @@
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../DotNetToolsInstaller/DotNetToolsInstaller.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>DotNetEfFullPath</_Parameter1>
<_Parameter2>$(NuGetPackageRoot)dotnet-ef/$(DotnetEfPackageVersion)/tools/netcoreapp2.0/any/dotnet-ef.dll</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Project>