コード例 #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)));
        }
コード例 #3
0
        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)));
        }