public ProductRepositoryTests() { ContextOptions = MockDbContext.GetContextOptions(); MockDbContext.Seed(ContextOptions); MapperConfiguration = new MapperConfiguration(mc => mc.AddProfile(new ProductProfile())).CreateMapper().ConfigurationProvider; DbContext = new ExercisesDbContext(ContextOptions); }
public ProductServiceTests() { ContextOptions = MockDbContext.GetContextOptions(); MockDbContext.Seed(ContextOptions); MapperConfiguration = new MapperConfiguration(mc => { mc.AddProfile(new DataLayer.Profiles.ProductProfile()); mc.AddProfile(new BusinessLayer.Profiles.ProductProfile()); }).CreateMapper().ConfigurationProvider; DbContext = new ExercisesDbContext(ContextOptions); productRepository = new ProductRepository(DbContext, MapperConfiguration); }