Exemplo n.º 1
0
        public void ExistingListsValuesArePersistedOnIListsThatAreProperties()
        {
            var mapper = new MemberMapper();

            var list = new List <int> {
                1, 2, 3, 4, 5
            };

            var array = new[] { 6, 7, 8, 9, 0 };

            var source = new SourceEnumerablePropertyClass
            {
                Foo = array
            };

            var destination = new DestinationIListPropertyClass
            {
                Foo = list
            };

            mapper.Map(source, destination);

            Assert.IsTrue(list.Contains(9));
            Assert.AreEqual(10, list.Count);
        }
Exemplo n.º 2
0
        public void ExistingListsValuesArePersistedOnIListsThatAreProperties()
        {
            var mapper = new MemberMapper();

              var list = new List<int> { 1, 2, 3, 4, 5 };

              var array = new[] { 6, 7, 8, 9, 0 };

              var source = new SourceEnumerablePropertyClass
              {
            Foo = array
              };

              var destination = new DestinationIListPropertyClass
              {
            Foo = list
              };

              mapper.Map(source, destination);

              Assert.IsTrue(list.Contains(9));
              Assert.AreEqual(10, list.Count);
        }