/// <summary>
 /// Initializes a new instance of the <see cref="AbstractCityResponse"/> class.
 /// </summary>
 public AbstractCityResponse()
 {
     City = new City();
     Location = new Location();
     Postal = new Postal();
     Subdivisions = new List<Subdivision>();
 }
Example #2
0
        public void OmniConstruction()
        {
            var city = new City();
            var omniReponse = new OmniResponse(city: city);

            Assert.AreEqual(omniReponse.City, city);
        }
Example #3
0
        public void InsightsConstruction()
        {
            var city = new City();
            var insightsReponse = new InsightsResponse(city);

            Assert.AreEqual(insightsReponse.City, city);
        }
        public void NameReturnsCorrectLocale()
        {
            var c = new City();
            c.Locales = new List<string> { "es" };
            c.Names = new Dictionary<string, string> { { "en", "Mexico City" }, { "es", "Ciudad de México" } };

            Assert.AreEqual("Ciudad de México", c.Name);
        }
        public void CanGetSingleName()
        {
            var c = new City();
            c.Locales = new List<string> { "en" };
            c.Names = new Dictionary<string, string> { { "en", "Foo" } };

            Assert.AreEqual("Foo", c.Name);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 public CityIspOrgResponse(
     City city = null,
     Continent continent = null,
     Country country = null, Location location = null,
     Model.MaxMind maxMind = null,
     Postal postal = null,
     Country registeredCountry = null,
     RepresentedCountry representedCountry = null,
     List<Subdivision> subdivisions = null,
     Traits traits = null)
     : base(city, continent, country, location, maxMind, postal, registeredCountry, representedCountry, subdivisions, traits)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractCityResponse"/> class.
 /// </summary>
 public AbstractCityResponse(
     City city = null, 
     Continent continent = null, 
     Country country = null,
     Location location = null,
     Model.MaxMind maxMind = null,
     Postal postal = null,
     Country registeredCountry = null, 
     RepresentedCountry representedCountry = null,
     List<Subdivision> subdivisions = null,
     Traits traits = null)
     : base(continent, country, maxMind, registeredCountry, representedCountry, traits)
 {
     City = city ?? new City();
     Location = location ?? new Location();
     Postal = postal ?? new Postal();
     Subdivisions = subdivisions ?? new List<Subdivision>();
 }