public void TestTransposeBetweenTwoClasses() { ClassOne source = new ClassOne { Field1 = "Hello", Field2 = "World", Property1 = "Goodbye", Property2 = "Universe" }; ClassTwo target = source.Transpose<ClassOne, ClassTwo>(); Assert.AreEqual("Hello", target.Field1); Assert.AreEqual("Universe", target.Property2); }
public void TestTransposeFailsWhenPropertyTypeMismatches() { ClassOne source = new ClassOne { Field1 = "Hello", Field2 = "World", Property1 = "Goodbye", Property2 = "Universe" }; source.Transpose<ClassOne, ClassFour>(); }