public void Map_Copies_All_Properties_LoadTest() { var b = new TypeB() { Foo = 42, Bar = 22, Baz = "ross", Fizz = new DateTime(1986, 8, 22) }; var watch = Stopwatch.StartNew(); for (int i = 0; i < 100000; i++) { var a = Mapper.Map<TypeB, TypeA>(b); } watch.Stop(); Debug.WriteLine("elapsed: {0}ms", watch.ElapsedMilliseconds); }
public void Map_Copies_All_Properties_Reverse() { var b = new TypeB() { Foo = 42, Bar = 22, Baz = "ross", Fizz = new DateTime(1986, 8, 22) }; var a = Mapper.Map<TypeB, TypeA>(b); Assert.Equal(b.Foo, a.Foo); Assert.Equal(b.Bar, a.Bar); Assert.Equal(b.Baz, a.Baz); Assert.Equal(b.Fizz, a.Fizz); }