public void CreateTest() { void test <T>(AddressDbRecord r) { var o = AddressObjectFactory.Create(r); Assert.IsInstanceOfType(o, typeof(T)); test <WebAddressObject>(GetRandom.Object <WebPageAddressDbRecord>()); test <EmailAddressObject>(GetRandom.Object <EmailAddressDbRecord>()); test <TelecomAddressObject>(GetRandom.Object <TelecomAddressDbRecord>()); test <GeographicAddressObject>(GetRandom.Object <GeographicAddressDbRecord>()); test <GeographicAddressObject>(GetRandom.Object <AddressDbRecord>()); test <GeographicAddressObject>(null); } }
public async Task <IAddressObject> GetObject(string id) { var r = await getObject(id); return(AddressObjectFactory.Create(r)); }