Ejemplo n.º 1
0
        public void ObjectHasNoDataObjects()
        {
            Accomodation accomodation = null;
            Flat         flat         = new Flat();
            var          autoMap      = new AutoMapper();

            autoMap.DoMapping <Accomodation, Flat>(accomodation, flat);
        }
Ejemplo n.º 2
0
        public void MapAccomodationToFlat()
        {
            var accomodation = new Accomodation()
            {
                number = 302, street = "stusa"
            };
            var flat = new Flat();
            var accomodationExpectedMapped = new Accomodation()
            {
                number = 302, street = "stusa"
            };
            var autoMap          = new AutoMapper();
            var flatActualMapped = autoMap.DoMapping <Accomodation, Flat>(accomodation, flat);

            Assert.IsTrue(accomodationExpectedMapped.number == flatActualMapped.Number && accomodationExpectedMapped.street == flatActualMapped.Street);
        }