public void RegularObjectWithoutDefaultConstructorIsCopied() { JustNumbers n = new JustNumbers(3, 4.0f); JustNumbers c = (JustNumbers)n.Copy(new JustNumbers(0, 0)); Assert.AreNotSame(n, c); Assert.AreEqual(n.TheA, c.TheA); Assert.AreEqual(n.TheB, c.TheB); }
public void TestCloneRegularObjectWithoutDefaultConstructor() { JustNumbers n = new JustNumbers(3, 4.0f); JustNumbers c = (JustNumbers)n.Copy(new JustNumbers(0, 0)); Assert.AreNotSame(n, c); Assert.AreEqual(n.TheA, c.TheA); Assert.AreEqual(n.TheB, c.TheB); }