Example #1
0
 public ProductRepositoryTests()
 {
     ContextOptions = MockDbContext.GetContextOptions();
     MockDbContext.Seed(ContextOptions);
     MapperConfiguration = new MapperConfiguration(mc => mc.AddProfile(new ProductProfile())).CreateMapper().ConfigurationProvider;
     DbContext           = new ExercisesDbContext(ContextOptions);
 }
Example #2
0
 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);
 }