Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        public async Task <IAddressObject> GetObject(string id)
        {
            var r = await getObject(id);

            return(AddressObjectFactory.Create(r));
        }