コード例 #1
0
        public void TestUsCityStateZipCtorPickSuburb()
        {
            var addrData = new AddressData {
                RegionAbbrev = "FL", PostalCode = "32101"
            };
            var testResult = new UsCityStateZip(addrData);

            testResult.GetXmlData();
            Assert.AreNotEqual("New York City", testResult.City);
            Assert.IsNotNull(testResult.Msa);
            Console.WriteLine(testResult.City);
        }
コード例 #2
0
        public void TestUsCityStateZipCtorStateAndCityOnly()
        {
            var addrData = new AddressData {
                RegionAbbrev = "NC", Locality = "CHARLOTTE"
            };
            var testResult = new UsCityStateZip(addrData);

            testResult.GetXmlData();
            Assert.AreNotEqual("New York City", testResult.City);
            Assert.IsNotNull(testResult.Msa);
            Console.WriteLine(testResult.City);

            addrData = new AddressData {
                RegionAbbrev = "CA", Locality = "Westhaven-Moonstone"
            };
            testResult = new UsCityStateZip(addrData);
            testResult.GetXmlData();
            Assert.IsNotNull(testResult.Msa);
        }