示例#1
0
        public void CustomerRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var customerRepository = new CustomerRepository(fixture.unitOfWork, fixture.customerLogger);

            var spec = CustomerSpecifications.EnabledCustomers();

            //Act
            var result = customerRepository.AllMatching(spec);

            //Assert
            Assert.NotNull(result.All(c => c.IsEnabled));
        }
        public void CustomerRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var unitOfWork = new MainBCUnitOfWork();
            ICustomerRepository customerRepository = new CustomerRepository(unitOfWork);

            var spec = CustomerSpecifications.EnabledCustomers();

            //Act
            var result = customerRepository.AllMatching(spec);

            //Assert
            Assert.IsNotNull(result.All(c => c.IsEnabled));
        }