Exemple #1
0
        public void CopyGnu()
        {
            Gnu e2 = new Gnu("e2", Gender.Male, 0, 0, 0);

            Animal e3 = new Gnu(e2);

            Assert.AreEqual(e2.Name, e3.Name);
            Assert.AreEqual(e2.Id, e3.Id);
            Assert.AreNotSame(e2, e3);
        }
Exemple #2
0
        public void CloningGnu()
        {
            Gnu e2 = new Gnu("e2", Gender.Male, 0, 0, 0);

            IAnimal e3 = e2.Clone();

            Assert.AreEqual(e2.Name, e3.Name);
            Assert.AreEqual(e2.Id, e3.Id);
            Assert.AreNotSame(e2, e3);
        }