Exemple #1
0
 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);
 }
Exemple #2
0
        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);
        }