Refactoring and Adding Tests (#58)
* Moving Identity seeding to its own class and method. * Adding tests for AddItem * Added catalog api controller and functional tests Added and cleaned up some comments * Adding integration tests for OrderRepository * Getting integration test for order working with inmemory db
This commit is contained in:
14
src/Infrastructure/Identity/AppIdentityDbContextSeed.cs
Normal file
14
src/Infrastructure/Identity/AppIdentityDbContextSeed.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Infrastructure.Identity
|
||||
{
|
||||
public class AppIdentityDbContextSeed
|
||||
{
|
||||
public static async Task SeedAsync(UserManager<ApplicationUser> userManager)
|
||||
{
|
||||
var defaultUser = new ApplicationUser { UserName = "demouser@microsoft.com", Email = "demouser@microsoft.com" };
|
||||
await userManager.CreateAsync(defaultUser, "Pass@word1");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user