public void ReturnsCorrectEntities() { using (var dbContext = new TestDbContextContainer()) { using (var repository = new DbContextCustomerRepository(dbContext)) { EFTestHelper.CreateCustomerIfNotAlreadyExists(100); EFTestHelper.CreateCustomerIfNotAlreadyExists(101); EFTestHelper.CreateCustomerIfNotAlreadyExists(102); var customers = repository.Find(x => x.Id >= 100 && x.Id <= 102).ToList(); Assert.AreEqual(3, customers.Count); } } }
public void ReturnsCorrectEntities() { using (var dbContext = new TestDbContextContainer()) { using (var repository = new DbContextCustomerRepository(dbContext)) { EFTestHelper.CreateCustomerIfNotAlreadyExists(100); EFTestHelper.CreateCustomerIfNotAlreadyExists(101); EFTestHelper.CreateCustomerIfNotAlreadyExists(102); var customers = repository.Find(x => x.Id >= 100 && x.Id <= 102).ToList(); Assert.AreEqual(3, customers.Count); } } }