Beispiel #1
0
 public void RegularObjectWithDefaultConstructorIsCopied()
 {
     JustNumbersDefault n = new JustNumbersDefault();
     n.TheA = 3;
     n.TheB = 4.0f;
     JustNumbersDefault c = (JustNumbersDefault)n.Copy(new JustNumbersDefault());
     Assert.AreNotSame(n, c);
     Assert.AreEqual(n.TheA, c.TheA);
     Assert.AreEqual(n.TheB, c.TheB);
 }
Beispiel #2
0
        public void TestCloneRegularObjectWithDefaultConstructor()
        {
            JustNumbersDefault n = new JustNumbersDefault();

            n.TheA = 3;
            n.TheB = 4.0f;
            JustNumbersDefault c = (JustNumbersDefault)n.Copy(new JustNumbersDefault());

            Assert.AreNotSame(n, c);
            Assert.AreEqual(n.TheA, c.TheA);
            Assert.AreEqual(n.TheB, c.TheB);
        }