public void FindCountriesInPageReturnNullIfNotData()
        {
            //Arrange
            var customerRepository = new StubICustomerRepository();
            var countryRepository  = new StubICountryRepository();

            //countryRepository.GetPagedInt32Int32ExpressionOfFuncOfCountryKPropertyBoolean<string>(
            //   (index, count, order, ascending) => { return new List<Country>(); });

            countryRepository.GetPagedOf1Int32Int32ExpressionOfFuncOfCountryM0Boolean <string>(
                (index, count, order, ascending) => new List <Country>());

            var customerManagementService = new CustomerAppService(countryRepository, customerRepository);

            //Act
            var result = customerManagementService.FindCountries(0, 1);

            //Assert
            Assert.IsNull(result);
        }
        public void FindCountriesInPageMaterializeResults()
        {
            //Arrange
            var customerRepository = new StubICustomerRepository();
            var countryRepository  = new StubICountryRepository();

/*         countryRepository.GetPagedInt32Int32ExpressionOfFuncOfCountryKPropertyBoolean<string>(
 *          (index, count, order, ascending) =>
 *          {
 *             var country = new Country("country name", "country iso");
 *             country.GenerateNewIdentity();
 *
 *             return new List<Country>()
 *             {
 *                country
 *             };
 *          });*/
            countryRepository.GetPagedOf1Int32Int32ExpressionOfFuncOfCountryM0Boolean <string>(
                (index, count, order, ascending) =>
            {
                var country = new Country("country name", " country iso");
                country.GenerateNewIdentity();
                return(new List <Country>()
                {
                    country
                });
            });

            var customerManagementService = new CustomerAppService(countryRepository, customerRepository);

            //Act
            var result = customerManagementService.FindCountries(0, 1);

            //Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Count == 1);
        }
      public void FindCountriesInPageMaterializeResults()
      {
         //Arrange
         var customerRepository = new StubICustomerRepository();
         var countryRepository = new StubICountryRepository();
/*         countryRepository.GetPagedInt32Int32ExpressionOfFuncOfCountryKPropertyBoolean<string>(
            (index, count, order, ascending) =>
            {
               var country = new Country("country name", "country iso");
               country.GenerateNewIdentity();

               return new List<Country>()
               {
                  country
               };
            });*/
         countryRepository.GetPagedOf1Int32Int32ExpressionOfFuncOfCountryM0Boolean<string>(
            (index, count, order, ascending) =>
            {
               var country = new Country("country name", " country iso");
               country.GenerateNewIdentity();
               return new List<Country>()
               {
                  country
               };
            });

         var customerManagementService = new CustomerAppService(countryRepository, customerRepository);

         //Act
         var result = customerManagementService.FindCountries(0, 1);

         //Assert
         Assert.IsNotNull(result);
         Assert.IsTrue(result.Count == 1);
      }
      public void FindCountriesInPageReturnNullIfNotData()
      {
         //Arrange
         var customerRepository = new StubICustomerRepository();
         var countryRepository = new StubICountryRepository();
         //countryRepository.GetPagedInt32Int32ExpressionOfFuncOfCountryKPropertyBoolean<string>(
         //   (index, count, order, ascending) => { return new List<Country>(); });

         countryRepository.GetPagedOf1Int32Int32ExpressionOfFuncOfCountryM0Boolean<string>(
            (index, count, order, ascending) => new List<Country>());

         var customerManagementService = new CustomerAppService(countryRepository, customerRepository);

         //Act
         var result = customerManagementService.FindCountries(0, 1);

         //Assert
         Assert.IsNull(result);
      }