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); }
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); }
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(); }
public void SetUp() { ba = new BarArray(); }