public void TestAddresses() { var os = new List <string>(); os.Add("Line1,Line2,Line3,House name,House number,Flat/Apt,Address1,Address2"); foreach (var tpl in testData) { var cam = new CustomerAddressModel { Line1 = tpl.Item1, Line2 = tpl.Item2, Line3 = tpl.Item3, }; cam.FillDetails(); os.Add(string.Join(",", new [] { cam.Line1, cam.Line2, cam.Line3, cam.HouseName, cam.HouseNumber, cam.FlatOrApartmentNumber, cam.Address1, cam.Address2 })); } // for each Log.Msg("\n\n{0}\n\n", string.Join("\n", os)); } // TestAddresses
} // HouseNumber public void SetAddress(string postCode, string line1, string line2, string line3) { Postcode = postCode; var cam = new CustomerAddressModel { Line1 = line1, Line2 = line2, Line3 = line3, }; cam.FillDetails(); HouseNumber = string.IsNullOrWhiteSpace(cam.HouseName) ? cam.HouseNumber : cam.HouseName; } // SetAddress