Cleanup
This commit is contained in:
parent
6ca38a31c0
commit
f36ca3fb33
|
|
@ -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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNet.Identity.Test;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Data.Entity.InMemory;
|
using Microsoft.Data.Entity.InMemory;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
//// permissions and limitations under the License.
|
//// permissions and limitations under the License.
|
||||||
|
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
|
using Microsoft.AspNet.Identity.Test;
|
||||||
using Microsoft.AspNet.Testing;
|
using Microsoft.AspNet.Testing;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Data.Entity.Metadata;
|
using Microsoft.Data.Entity.Metadata;
|
||||||
|
|
@ -83,7 +84,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task CanCreateUserUsingEF()
|
public void CanCreateUserUsingEF()
|
||||||
{
|
{
|
||||||
using (var db = CreateContext())
|
using (var db = CreateContext())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Identity.Entity;
|
using Microsoft.AspNet.Identity.Test;
|
||||||
using Microsoft.AspNet.PipelineCore;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
using Microsoft.Framework.DependencyInjection.Fallback;
|
using Microsoft.Framework.DependencyInjection.Fallback;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Data.Entity;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Microsoft.AspNet.Builder;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Identity.Entity.Test
|
namespace Microsoft.AspNet.Identity.Entity.Test
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue