diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/IdentitySpecificationTestBase.cs b/src/Microsoft.AspNetCore.Identity.Specification.Tests/IdentitySpecificationTestBase.cs index bf5439411f..8c23e5dc04 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/IdentitySpecificationTestBase.cs +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/IdentitySpecificationTestBase.cs @@ -10,8 +10,6 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Testing; -using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -2344,11 +2342,13 @@ namespace Microsoft.AspNetCore.Identity.Test var user = CreateTestUser(); IdentityResultAssert.IsSuccess(await manager.CreateAsync(user)); const string error = "No IUserTokenProvider named 'bogus' is registered."; - await - ExceptionAssert.ThrowsAsync( - () => manager.GenerateTwoFactorTokenAsync(user, "bogus"), error); - await ExceptionAssert.ThrowsAsync( - () => manager.VerifyTwoFactorTokenAsync(user, "bogus", "bogus"), error); + var ex = await + Assert.ThrowsAsync( + () => manager.GenerateTwoFactorTokenAsync(user, "bogus")); + Assert.Equal(error, ex.Message); + ex = await Assert.ThrowsAsync( + () => manager.VerifyTwoFactorTokenAsync(user, "bogus", "bogus")); + Assert.Equal(error, ex.Message); } /// @@ -2597,8 +2597,7 @@ namespace Microsoft.AspNetCore.Identity.Test /// Test. /// /// Task - [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Fails due to threading bugs in Mono")] + [Fact] public async Task CanGetUsersWithClaims() { if (ShouldSkipDbTests()) @@ -2627,8 +2626,7 @@ namespace Microsoft.AspNetCore.Identity.Test /// Test. /// /// Task - [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Fails due to threading bugs in Mono")] + [Fact] public async Task CanGetUsersInRole() { if (ShouldSkipDbTests()) 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 c7d3d4905d..f1dd7abffd 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 @@ -14,7 +14,6 @@ -