Netcore3.0 (#323)
* Updates based on documentation * Getting the build passing * Getting app functioning * A few cleanups to confirm it's working as expected * Fixing functional tests * Updating dockerfile for 3.0 * Functional Tests now run sequentially * Updating to latest version of moq * Adding migration for post 3.0 upgrades * Removing commented out lines * Moving address and catalogitemordered configuration in to classes that own them * Minor cleanups
This commit is contained in:
committed by
Steve Smith
parent
9a21db6979
commit
4442015835
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<RootNamespace>Microsoft.eShopWeb.FunctionalTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
@@ -13,15 +13,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0" />
|
||||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class AccountControllerSignIn : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public AccountControllerSignIn(CustomWebApplicationFactory<Startup> factory)
|
||||
@@ -42,7 +43,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
var group = match.Groups.LastOrDefault();
|
||||
var group = match.Groups.Values.LastOrDefault();
|
||||
Assert.NotNull(group);
|
||||
Assert.True(group.Value.Length > 50);
|
||||
}
|
||||
@@ -63,7 +64,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
return match.Groups.LastOrDefault().Value;
|
||||
return match.Groups.Values.LastOrDefault().Value;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -8,6 +8,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class ApiCatalogControllerList : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public ApiCatalogControllerList(CustomWebApplicationFactory<Startup> factory)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class CatalogControllerIndex : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public CatalogControllerIndex(CustomWebApplicationFactory<Startup> factory)
|
||||
|
||||
@@ -7,6 +7,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class OrderIndexOnGet : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public OrderIndexOnGet(CustomWebApplicationFactory<Startup> factory)
|
||||
|
||||
@@ -40,11 +40,6 @@ namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
||||
options.UseInternalServiceProvider(provider);
|
||||
});
|
||||
|
||||
services.AddIdentity<ApplicationUser, IdentityRole>()
|
||||
.AddDefaultUI(UIFramework.Bootstrap4)
|
||||
.AddEntityFrameworkStores<AppIdentityDbContext>()
|
||||
.AddDefaultTokenProviders();
|
||||
|
||||
// Build the service provider.
|
||||
var sp = services.BuildServiceProvider();
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.WebRazorPages
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class BasketPageCheckout : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public BasketPageCheckout(CustomWebApplicationFactory<Startup> factory)
|
||||
@@ -28,7 +29,7 @@ namespace Microsoft.eShopWeb.FunctionalTests.WebRazorPages
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
return match.Groups.LastOrDefault().Value;
|
||||
return match.Groups.Values.LastOrDefault().Value;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -6,6 +6,7 @@ using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.WebRazorPages
|
||||
{
|
||||
[Collection("Sequential")]
|
||||
public class HomePageOnGet : IClassFixture<CustomWebApplicationFactory<Startup>>
|
||||
{
|
||||
public HomePageOnGet(CustomWebApplicationFactory<Startup> factory)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<RootNamespace>Microsoft.eShopWeb.IntegrationTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="Moq" Version="4.13.0" />
|
||||
<PackageReference Include="Moq" Version="4.13.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<RootNamespace>Microsoft.eShopWeb.UnitTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
@@ -9,7 +9,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="Moq" Version="4.13.0" />
|
||||
<PackageReference Include="Moq" Version="4.13.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
Reference in New Issue
Block a user