public void ObjectMapConfig_Map_Inherit_New_List_Property()
        {
            var config = new ObjectMapConfig();

            var s1 = new ScheduleRecord();

            s1.Title     = "s1";
            s1.StartTime = new DateTimeOffset();
            s1.EndTime   = new DateTimeOffset();
            var s2 = new ScheduleRecordChild();

            config.Map(s1, s2);

            Assert.AreEqual(s1.Title, s2.Title);
        }
Beispiel #2
0
        public void ObjectMapper_Map_Inherit_New_List_Property()
        {
            var mapper = new ObjectMapper();

            var s1 = new ScheduleRecord();

            s1.Title     = "s1";
            s1.StartTime = new DateTimeOffset(2020, 1, 1, 9, 0, 0, TimeSpan.FromHours(9));
            s1.EndTime   = new DateTimeOffset(2020, 1, 1, 10, 0, 0, TimeSpan.FromHours(9));
            var s2 = new ScheduleRecordChild();

            mapper.Map(s1, s2);

            Assert.AreEqual(s1.Title, s2.Title);
        }