From 4033ea95c6e6ff427afaecaf9386359fc72affef Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 17 Oct 2014 07:30:14 -0700 Subject: [PATCH] Fixing compilation issue with EntiryFramework --- .../CustomPocoTest.cs | 6 ------ .../DbUtil.cs | 3 +-- .../DefaultPocoTest.cs | 4 ---- .../UserStoreTest.cs | 7 +++---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/test/Microsoft.AspNet.Identity.EntityFramework.Test/CustomPocoTest.cs b/test/Microsoft.AspNet.Identity.EntityFramework.Test/CustomPocoTest.cs index 3efdaaf2ac..9389a195d9 100644 --- a/test/Microsoft.AspNet.Identity.EntityFramework.Test/CustomPocoTest.cs +++ b/test/Microsoft.AspNet.Identity.EntityFramework.Test/CustomPocoTest.cs @@ -4,15 +4,9 @@ using System; using System.Linq; using System.Threading.Tasks; -using JetBrains.Annotations; using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Metadata; -using Microsoft.Data.Entity.Services; -using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; -using Microsoft.Framework.Logging; -using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.EntityFramework.Test diff --git a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DbUtil.cs b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DbUtil.cs index e0f9098c03..eb6fa14c8b 100644 --- a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DbUtil.cs +++ b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DbUtil.cs @@ -3,7 +3,6 @@ using Microsoft.AspNet.Hosting; using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Services; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.Logging; @@ -29,7 +28,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework.Test services.Add(HostingServices.GetDefaultServices()); services.AddEntityFramework().AddSqlServer().AddDbContext(options => options.UseSqlServer(connectionString)); services.Add(OptionsServices.GetDefaultServices()); - services.AddInstance(new NullLoggerFactory()); + services.AddInstance(new LoggerFactory()); return services; } diff --git a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs index dcad05dea6..a1d348151c 100644 --- a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs +++ b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs @@ -5,12 +5,8 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Identity.Test; -using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Services; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; -using Microsoft.Framework.Logging; -using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.EntityFramework.Test diff --git a/test/Microsoft.AspNet.Identity.EntityFramework.Test/UserStoreTest.cs b/test/Microsoft.AspNet.Identity.EntityFramework.Test/UserStoreTest.cs index c0d62cd66e..fbdc94a882 100644 --- a/test/Microsoft.AspNet.Identity.EntityFramework.Test/UserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.EntityFramework.Test/UserStoreTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Services; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.Logging; @@ -77,7 +76,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework.Test builder.UseServices(services => { - services.AddInstance(new NullLoggerFactory()); + services.AddInstance(new LoggerFactory()); services.Add(HostingServices.GetDefaultServices()); services.AddEntityFramework() .AddSqlServer() @@ -111,7 +110,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework.Test using (var db = CreateContext()) { var guid = Guid.NewGuid().ToString(); - db.Users.Add(new IdentityUser {Id = guid, UserName = guid}); + db.Users.Add(new IdentityUser { Id = guid, UserName = guid }); db.SaveChanges(); Assert.True(db.Users.Any(u => u.UserName == guid)); Assert.NotNull(db.Users.FirstOrDefault(u => u.UserName == guid)); @@ -278,7 +277,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework.Test { var manager = CreateManager(); var guid = Guid.NewGuid().ToString(); - var user = new IdentityUser { UserName = "New"+guid }; + var user = new IdentityUser { UserName = "New" + guid }; IdentityResultAssert.IsSuccess(await manager.CreateAsync(user)); IdentityResultAssert.IsSuccess(await manager.DeleteAsync(user)); }