public RestaurantRepositoryTests(DatababaseFixture databaseFixture) { _databaseFixture = databaseFixture; var dataBaseProvider = new Mock <IDatabaseProvider>(); dataBaseProvider.Setup(dbp => dbp.Db).Returns(_databaseFixture.Db); _mapper = new Mock <IModelMapper <Restaurant, RestaurantPoco> >(); _repo = new RestaurantRepository(dataBaseProvider.Object, _mapper.Object); }
public OrderRepositoryTests(DatababaseFixture databaseFixture) { _databaseFixture = databaseFixture; var dataBaseProvider = new Mock <IDatabaseProvider>(); dataBaseProvider.Setup(dbp => dbp.Db).Returns(_databaseFixture.Db); _orderMapper = new Mock <IModelMapper <Order, OrderPoco> >(); _mealMapper = new Mock <IModelMapper <OrderedMeal, OrderedMealPoco> >(); _repo = new OrderRepository( dataBaseProvider.Object, _orderMapper.Object, _mealMapper.Object); }