Ejemplo n.º 1
0
        public void List_To_Array_Is_Mapped()
        {
            var source = new FooList {
                Ints = new List <int>(new int[] { 1, 2, 3, 4, 5 })
            };
            var target = new BarArray();

            TypeAdapter.Adapt(source, target);
            target.Ints.Length.ShouldBe(source.Ints.Count);
            target.Ints.ShouldBe(source.Ints);
        }
Ejemplo n.º 2
0
        public void Single_Dimensional_Array_Is_Mapped()
        {
            var source = new FooArray {
                Ints = new int[] { 1, 2, 3, 4, 5 }
            };
            var target = new BarArray();

            TypeAdapter.Adapt(source, target);
            target.Ints.Length.ShouldBe(source.Ints.Length);
            target.Ints.ShouldBe(source.Ints);
        }
Ejemplo n.º 3
0
        public void MapToTarget_With_Null_Value()
        {
            var source = new FooArray {
                Ints = null
            };
            var target = new BarArray {
                Ints = new int[] { 1, 2, 3, 4, 5 }
            };

            TypeAdapter.Adapt(source, target);
            target.Ints.ShouldBeNull();
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     ba = new BarArray();
 }