示例#1
0
        public void GetCopyTest()
        {
            Drink drink  = new Drink("haha", 20);
            Drink drink2 = drink.GetCopy();

            Assert.AreEqual(drink.name, drink2.name);
            Assert.AreEqual(drink.price, drink2.price);
            drink.SetPrice("0");
            Assert.AreNotEqual(drink.price, drink2.price);
        }
示例#2
0
        public void GetCopyTest()
        {
            Drink addition  = new Drink("haha", 20);
            Drink addition2 = addition.GetCopy();

            Assert.AreEqual(addition.name, addition2.name);
            Assert.AreEqual(addition.price, addition2.price);
            addition.SetPrice("0");
            Assert.AreNotEqual(addition.price, addition2.price);
        }