예제 #1
0
        public static GeographicAddressObject CreateAddress(string id, string addressLine,
                                                            string city, string regionOrState, string zipOrPostalCode, string countryId,
                                                            DateTime?validFrom = null, DateTime?validTo = null)
        {
            var r = new GeographicAddressDbRecord {
                ID      = id,
                Address = addressLine,
                ZipOrPostCodeOrExtension   = zipOrPostalCode,
                RegionOrStateOrCountryCode = regionOrState,
                CityOrAreaCode             = city,
                CountryID = countryId,
                ValidFrom = validFrom ?? DateTime.MinValue,
                ValidTo   = validTo ?? DateTime.MaxValue
            };

            return(new GeographicAddressObject(r));
        }
예제 #2
0
 private static void validateGeographivAddress(GeographicAddressDbRecord actual, GeographicAddressDbRecord expected)
 {
     if (!(actual is null))
     {
         Assert.AreEqual(actual.CountryID, expected.CountryID);
     }
예제 #3
0
 private static GeographicAddressObject create(GeographicAddressDbRecord dbRecord)
 {
     return(new GeographicAddressObject(dbRecord));
 }