Exemplo n.º 1
0
        //[TestCase("2981 Country Manor Ln123, Las Vegas, NV, 89115", "{ address_line: '2981 Country Manor Ln # 123', street_no: '2981', street_direction: null, street: 'Country Manor', street_suffix: 'Ln', city: 'Las Vegas', state: 'NV', zip: '89115', unit: '# 123' }")]
        //[TestCase("2901 PALO VERDE LN#20, Yuma, AZ, 85365", "{ address_line: '2901 Palo Verde Ln # 20', street_no: '2901', street_direction: null, street: 'Palo Verde', street_suffix: 'Ln', city: 'Yuma', state: 'AZ', zip: '85365', unit: '# 20' }")]
        //[TestCase("601 Van Ness1006, San Francisco, CA, 94102", "{ address_line: '601 Van Ness # 1006', street_no: '601', street_direction: null, street: 'Van Ness', street_suffix: null, city: 'San Francisco', state: 'CA', zip: '94102', unit: '# 1006' }")]
        //[TestCase("296 E 38TH ST5F,NEW YORK,NY,11203", "{ address_line: '296 E 38th St # 5F', street_no: '296', street_direction: 'E', street: '38th', street_suffix: 'St', city: 'New York', state: 'NY', zip: '11203', unit: '# 5F' }")]
        public void VerifyInternalParser_SDSWONE_897(string addressString, string expectedAddressObjAsString)
        {
            var ap = new AddressParser3();

            var parsed = ap.ParseAddress(addressString);

            var jExp     = JObject.Parse(expectedAddressObjAsString);
            var expected = jExp.ToObject <Address>();

            AssertAddressAreEqual(expected, parsed);
        }
Exemplo n.º 2
0
        public void Test1(string addressString, string expectedAddressObjAsString)
        {
            var ap = new AddressParser3();

            var parsed = ap.ParseAddress(addressString);

            var jExp     = JObject.Parse(expectedAddressObjAsString);
            var expected = jExp.ToObject <Address>();

            AssertAddressAreEqual(expected, parsed);
        }