From f36ca3fb336b1fee995666effc2ac9018b5bc7f3 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 7 May 2014 13:03:55 -0700 Subject: [PATCH] Cleanup --- .../IdentityResultAssert.cs | 44 ------------------- .../RoleStoreTest.cs | 1 + .../SqlUserStoreTest.cs | 3 +- .../StartupTest.cs | 8 ++-- .../IdentityResultAssert.cs | 44 ------------------- .../TestUser.cs | 25 ----------- 6 files changed, 6 insertions(+), 119 deletions(-) delete mode 100644 test/Microsoft.AspNet.Identity.Entity.Test/IdentityResultAssert.cs delete mode 100644 test/Microsoft.AspNet.Identity.InMemory.Test/IdentityResultAssert.cs delete mode 100644 test/Microsoft.AspNet.Identity.Security.Test/TestUser.cs diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/IdentityResultAssert.cs b/test/Microsoft.AspNet.Identity.Entity.Test/IdentityResultAssert.cs deleted file mode 100644 index c6bb6cddfe..0000000000 --- a/test/Microsoft.AspNet.Identity.Entity.Test/IdentityResultAssert.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. -// All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING -// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF -// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR -// NON-INFRINGEMENT. -// See the Apache 2 License for the specific language governing -// permissions and limitations under the License. - -using System.Linq; -using Xunit; - -namespace Microsoft.AspNet.Identity.Entity.Test -{ - public static class IdentityResultAssert - { - public static void IsSuccess(IdentityResult result) - { - Assert.NotNull(result); - Assert.True(result.Succeeded); - } - - public static void IsFailure(IdentityResult result) - { - Assert.NotNull(result); - Assert.False(result.Succeeded); - } - - public static void IsFailure(IdentityResult result, string error) - { - Assert.NotNull(result); - Assert.False(result.Succeeded); - Assert.Equal(error, result.Errors.First()); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/RoleStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/RoleStoreTest.cs index eb60ad5ad7..0b7a62d3db 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/RoleStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/RoleStoreTest.cs @@ -17,6 +17,7 @@ using System; using System.Threading.Tasks; +using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; using Microsoft.Data.Entity.InMemory; using Microsoft.Framework.DependencyInjection; diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs index b805adddbb..a34bd72503 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs @@ -16,6 +16,7 @@ //// permissions and limitations under the License. using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Identity.Test; using Microsoft.AspNet.Testing; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Metadata; @@ -83,7 +84,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test } [Fact] - public async Task CanCreateUserUsingEF() + public void CanCreateUserUsingEF() { using (var db = CreateContext()) { diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs index df4c0867a3..af7d29237b 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs @@ -1,13 +1,11 @@ -using Microsoft.AspNet.Http; -using Microsoft.AspNet.Identity.Entity; -using Microsoft.AspNet.PipelineCore; +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Identity.Test; +using Microsoft.Data.Entity; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; using System; using System.Threading.Tasks; -using Microsoft.Data.Entity; using Xunit; -using Microsoft.AspNet.Builder; namespace Microsoft.AspNet.Identity.Entity.Test { diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/IdentityResultAssert.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/IdentityResultAssert.cs deleted file mode 100644 index 824c95fb3c..0000000000 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/IdentityResultAssert.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. -// All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING -// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF -// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR -// NON-INFRINGEMENT. -// See the Apache 2 License for the specific language governing -// permissions and limitations under the License. - -using System.Linq; -using Xunit; - -namespace Microsoft.AspNet.Identity.InMemory.Test -{ - public static class IdentityResultAssert - { - public static void IsSuccess(IdentityResult result) - { - Assert.NotNull(result); - Assert.True(result.Succeeded); - } - - public static void IsFailure(IdentityResult result) - { - Assert.NotNull(result); - Assert.False(result.Succeeded); - } - - public static void IsFailure(IdentityResult result, string error) - { - Assert.NotNull(result); - Assert.False(result.Succeeded); - Assert.Equal(error, result.Errors.First()); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Identity.Security.Test/TestUser.cs b/test/Microsoft.AspNet.Identity.Security.Test/TestUser.cs deleted file mode 100644 index a769a4d8b0..0000000000 --- a/test/Microsoft.AspNet.Identity.Security.Test/TestUser.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. -// All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING -// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF -// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR -// NON-INFRINGEMENT. -// See the Apache 2 License for the specific language governing -// permissions and limitations under the License. - -namespace Microsoft.AspNet.Identity.Security.Test -{ - public class TestUser - { - public string Id { get; private set; } - public string UserName { get; set; } - } -} \ No newline at end of file