public void ByTest12() { var value = new Test12(); var values = new Test12[] { value }; var expect = (Test12[])value.To(typeof(Test12[])); Assert.True(values.SequenceEqual(expect)); }
public void ByTest12() { var value = new Test12(); var values = new Test12[] { value }; var expect = value.To <Test12[]>(); Assert.True(values.SequenceEqual(expect)); }
public void ByDerived() { var value = new Test12() { Property11 = 2, Property12 = 4 }; var result = value.To <Test11>(); var expect = new Test11() { Property11 = 2 }; Assert.True(expect.Equals(result)); }
public void BySelf() { var value = new Test12() { Property11 = 2, Property12 = 4 }; var result = value.To <Test12>(); var expect = new Test12() { Property11 = 2, Property12 = 4 }; Assert.True(result.Equals(expect)); }