Ejemplo n.º 1
0
        public void Test_Cheese_CopyTo_Returns_Coppied_Cheese()
        {
            _cheese.Price          = 10;
            _cheese.BestBeforeDate = DateTime.Parse("2016-03-19");
            _cheese.DaysToSell     = 5;
            _cheese.Name           = "Good Cheese";
            _cheese.Type           = CheeseTypes.Aged;

            var newCheese = new Cheese();

            _cheese.CopyTo(newCheese);
            Assert.IsNotNull(newCheese);

            Assert.AreEqual(_cheese.Price, newCheese.Price);
            Assert.AreEqual(_cheese.BestBeforeDate, newCheese.BestBeforeDate);
            Assert.AreEqual(_cheese.DaysToSell, newCheese.DaysToSell);
            Assert.AreEqual(_cheese.Name, newCheese.Name);
            Assert.AreEqual(_cheese.Type, newCheese.Type);
        }