public void CopyToTest2() { TestDemo1 t1 = new TestDemo1() { MyProperty1 = "AA", MyProperty2 = 22, MyProperty3 = 11.1 }; var t2 = t1.CopyTo<TestDemo3>(); Assert.Equal(t1.MyProperty1, t2.MyProperty1); Assert.Equal(t1.MyProperty2, t2.MyProperty2); Assert.Equal(t1.MyProperty3, t2.MyProperty3); }
public void CopyFromTest() { TestDemo1 t1 = new TestDemo1() { MyProperty1 = "AA", MyProperty2 = 22, MyProperty3 = 11.1 }; var t2 = new TestDemo3(); t2.CopyFrom(t1); Assert.Equal(t1.MyProperty1, t2.MyProperty1); Assert.Equal(t1.MyProperty2, t2.MyProperty2); Assert.Equal(t1.MyProperty3, t2.MyProperty3); }
public void CopyToTest2() { TestDemo1 t1 = new TestDemo1() { MyProperty1 = "AA", MyProperty2 = 22, MyProperty3 = 11.1 }; var t2 = t1.CopyTo <TestDemo3>(); Assert.Equal(t1.MyProperty1, t2.MyProperty1); Assert.Equal(t1.MyProperty2, t2.MyProperty2); Assert.Equal(t1.MyProperty3, t2.MyProperty3); }