public AddressVm Build(AddressDt addressDt)
        {
            var addressVm = new AddressVm();

            addressVm.City          = addressDt.City;
            addressVm.Country       = addressDt.Country;
            addressVm.Name          = addressDt.Name;
            addressVm.PostCode      = addressDt.PostCode;
            addressVm.Region        = addressDt.Region;
            addressVm.StreetAddress = addressDt.StreetAddress;
            addressVm.Suburb        = addressDt.Suburb;

            return(addressVm);
        }
Пример #2
0
        public void Build_Test01()
        {
            var addressDt = new AddressDt()
            {
                Name          = "name",
                StreetAddress = "streetAddress",
                Suburb        = "Suburb",
                City          = "City",
                Country       = "Country",
                Region        = "Region",
                PostCode      = "PostCode"
            };

            var actual = new AddressVmModelBuilder().Build(addressDt);

            Assert.That(actual.City, Is.EqualTo(addressDt.City));
            Assert.That(actual.Country, Is.EqualTo(addressDt.Country));
            Assert.That(actual.Name, Is.EqualTo(addressDt.Name));
            Assert.That(actual.PostCode, Is.EqualTo(addressDt.PostCode));
            Assert.That(actual.Region, Is.EqualTo(addressDt.Region));
            Assert.That(actual.StreetAddress, Is.EqualTo(addressDt.StreetAddress));
            Assert.That(actual.Suburb, Is.EqualTo(addressDt.Suburb));
        }