Пример #1
0
        public void CountryRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var countryRepository = new CountryRepository(fixture.unitOfWork, fixture.countryLogger);

            string textToFind = "ain";
            var    spec       = CountrySpecifications.CountryFullText(textToFind);

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

            //Assert
            Assert.NotNull(result.All(c => c.CountryISOCode.Contains(textToFind) || c.CountryName.Contains(textToFind)));
        }
Пример #2
0
        public void CountryRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var unitOfWork        = new MainBcUnitOfWork();
            var countryRepository = new CountryRepository(unitOfWork);

            var textToFind = "ain";
            var spec       = CountrySpecifications.CountryFullText(textToFind);

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

            //Assert
            Assert.IsNotNull(result.All(c => c.CountryIsoCode.Contains(textToFind) || c.CountryName.Contains(textToFind)));
        }
        public void CountryRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var unitOfWork = new MainBCUnitOfWork();
            ICountryRepository countryRepository = new CountryRepository(unitOfWork);

            string textToFind = "ain";
            var spec = CountrySpecifications.CountryFullText(textToFind);

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

            //Assert
            Assert.IsNotNull(result.All(c=>c.CountryISOCode.Contains(textToFind) || c.CountryName.Contains(textToFind)));
        }