From 8d8faf9adc78ea51eff072b1a947458058003350 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 15 Mar 2017 14:47:08 -0700 Subject: [PATCH] Unify dependency versions to one file and remove workarounds Upgrade to stable version of Moq Simplify sample dependencies by using metapackage --- build/dependencies.props | 8 ++- .../IdentitySample.Mvc.csproj | 53 +++++++++---------- ...ft.AspNet.Identity.AspNetCoreCompat.csproj | 12 +++-- ...etCore.Identity.EntityFrameworkCore.csproj | 10 +++- ...etCore.Identity.Specification.Tests.csproj | 17 ++++-- .../Microsoft.AspNetCore.Identity.csproj | 14 +++-- ...y.EntityFrameworkCore.InMemory.Test.csproj | 23 +++++--- ...e.Identity.EntityFrameworkCore.Test.csproj | 33 +++++++----- ...t.AspNetCore.Identity.InMemory.Test.csproj | 30 +++++++---- .../Microsoft.AspNetCore.Identity.Test.csproj | 25 +++++---- .../SecurityStampValidatorTest.cs | 4 +- .../SignInManagerTest.cs | 2 +- .../UserManagerTest.cs | 4 +- 13 files changed, 144 insertions(+), 91 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e704edaec0..553e9a5111 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,12 @@ - 1.6.1 + 1.2.0-* 4.3.0 + 2.2.1 + 4.7.1 + 1.6.1 + 3.0.1 + 15.0.0 + 2.2.0 diff --git a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj index 544e290d2c..603cf6a415 100644 --- a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj +++ b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj @@ -1,42 +1,37 @@  + + + Identity sample MVC application on ASP.NET Core net451;netcoreapp1.1 - - win7-x64 - true - Exe + aspnetcore-b3d20cbe-418e-4bf2-a0f4-57f91d067e07 - - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - \ No newline at end of file + diff --git a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj index 5d467f0b5e..2e4c73dfb1 100644 --- a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj +++ b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj @@ -1,5 +1,7 @@  + + A compatibility layer for sharing identity databases between Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNetCore.Identity.EntityFrameworkCore. 0.3.0 @@ -8,9 +10,11 @@ true aspnetcore;identity;membership + - - - + + + - \ No newline at end of file + + diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj index 29621db960..b6e31b7c65 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj @@ -1,19 +1,25 @@  + + ASP.NET Core Identity provider that uses Entity Framework Core. net451;netstandard1.3 true aspnetcore;entityframeworkcore;identity;membership + + - - + + + + diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj index 96e4a89e23..8c8212de43 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj @@ -1,25 +1,32 @@  + + Shared test suite for Asp.Net Identity Core store implementations. net452;netstandard1.3 true aspnetcore;identity;membership + + - - - - - + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj b/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj index aab666228f..f8b2c5793b 100644 --- a/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj +++ b/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj @@ -1,16 +1,20 @@  + + ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. net451;netstandard1.3 true aspnetcore;identity;membership + - - - - + + + + - \ No newline at end of file + + diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj index b51447cd2b..fc36411c6e 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj @@ -1,28 +1,35 @@  + + netcoreapp1.1;net452 netcoreapp1.1 + + + - - - - - - - - + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj index c16fab27d1..85bcf8ca0e 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj @@ -1,34 +1,41 @@  + + netcoreapp1.1;net452 netcoreapp1.1 + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj index a8bd2a8f0b..cb1200b804 100644 --- a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj @@ -1,26 +1,36 @@  + + netcoreapp1.1;net452 netcoreapp1.1 + + + - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj index 1054b89fb4..9918832c6d 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj @@ -1,28 +1,35 @@  + + netcoreapp1.1;net452 netcoreapp1.1 + + + - - - - - - - - - + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Test/SecurityStampValidatorTest.cs b/test/Microsoft.AspNetCore.Identity.Test/SecurityStampValidatorTest.cs index c6c955486b..7bdaa811ab 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/SecurityStampValidatorTest.cs +++ b/test/Microsoft.AspNetCore.Identity.Test/SecurityStampValidatorTest.cs @@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Identity.Test contextAccessor.Setup(a => a.HttpContext).Returns(httpContext.Object); var signInManager = new Mock>(userManager.Object, contextAccessor.Object, claimsManager.Object, options.Object, null); - signInManager.Setup(s => s.ValidateSecurityStampAsync(It.IsAny())).ReturnsAsync(null).Verifiable(); + signInManager.Setup(s => s.ValidateSecurityStampAsync(It.IsAny())).ReturnsAsync(default(TestUser)).Verifiable(); var services = new ServiceCollection(); services.AddSingleton(options.Object); services.AddSingleton(signInManager.Object); @@ -121,7 +121,7 @@ namespace Microsoft.AspNetCore.Identity.Test contextAccessor.Setup(a => a.HttpContext).Returns(httpContext.Object); var signInManager = new Mock>(userManager.Object, contextAccessor.Object, claimsManager.Object, options.Object, null); - signInManager.Setup(s => s.ValidateSecurityStampAsync(It.IsAny())).ReturnsAsync(null).Verifiable(); + signInManager.Setup(s => s.ValidateSecurityStampAsync(It.IsAny())).ReturnsAsync(default(TestUser)).Verifiable(); var services = new ServiceCollection(); services.AddSingleton(options.Object); services.AddSingleton(signInManager.Object); diff --git a/test/Microsoft.AspNetCore.Identity.Test/SignInManagerTest.cs b/test/Microsoft.AspNetCore.Identity.Test/SignInManagerTest.cs index c32f8e96ea..06f630c4ba 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/SignInManagerTest.cs +++ b/test/Microsoft.AspNetCore.Identity.Test/SignInManagerTest.cs @@ -731,7 +731,7 @@ namespace Microsoft.AspNetCore.Identity.Test { // Setup var manager = MockHelpers.MockUserManager(); - manager.Setup(m => m.FindByNameAsync("bogus")).ReturnsAsync(null).Verifiable(); + manager.Setup(m => m.FindByNameAsync("bogus")).ReturnsAsync(default(TestUser)).Verifiable(); var context = new Mock(); var helper = SetupSignInManager(manager.Object, context.Object); diff --git a/test/Microsoft.AspNetCore.Identity.Test/UserManagerTest.cs b/test/Microsoft.AspNetCore.Identity.Test/UserManagerTest.cs index 0bcf708f82..d38354f205 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/UserManagerTest.cs +++ b/test/Microsoft.AspNetCore.Identity.Test/UserManagerTest.cs @@ -492,7 +492,7 @@ namespace Microsoft.AspNetCore.Identity.Test var store = new Mock>(); var manager = MockHelpers.TestUserManager(store.Object); var user = new TestUser { UserName = "nulldude" }; - store.Setup(s => s.GetSecurityStampAsync(user, It.IsAny())).ReturnsAsync(null).Verifiable(); + store.Setup(s => s.GetSecurityStampAsync(user, It.IsAny())).ReturnsAsync(default(string)).Verifiable(); // Act // Assert @@ -509,7 +509,7 @@ namespace Microsoft.AspNetCore.Identity.Test var store = new Mock>(); var manager = MockHelpers.TestUserManager(store.Object); var user = new TestUser { UserName = "nulldude" }; - store.Setup(s => s.GetSecurityStampAsync(user, It.IsAny())).ReturnsAsync(null).Verifiable(); + store.Setup(s => s.GetSecurityStampAsync(user, It.IsAny())).ReturnsAsync(default(string)).Verifiable(); // Act // Assert