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(); }
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"); }
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; }