상속: ICountryCodeService
예제 #1
0
 public void countrycodeservice_can_get_country_codes_test()
 {
     //given
     ICountryCodeService service = new CountryCodeService(new JsonSerializationService<ISOCountryCodeCollection>());
     //when
     var countryCodes = service.GetCountryCodes();
     //then
     countryCodes.Should().NotBeNull();
 }
예제 #2
0
 public void countrycodeservice_can_get_country_code_by_iso_long_code_test()
 {
     //given
     ICountryCodeService service = new CountryCodeService(new JsonSerializationService<ISOCountryCodeCollection>());
     string isoLongCode = "PNG";
     //when
     var countryCode = service.GetCountryCodeByISOLongCode(isoLongCode);
     //then
     countryCode.Value.Should().Be("PNG");
 }
예제 #3
0
 private void LoadCountries()
 {
     ICountryCodeService service = new CountryCodeService(new JsonSerializationService<ISOCountryCodeCollection>());
     var countryCodes = service.GetCountryCodes();
     foreach (var countryCode in countryCodes)
     {
         _bindingListCountries.Add(countryCode);
     }
     bsCountries.DataSource = _bindingListCountries;
     _bindingListCountries.AllowEdit = false;
 }