Ejemplo n.º 1
0
        public void GetWetFoodGoodsTypeTest()   // Test return correct Wet Goods Type
        //--Arrange
        {
            var    wetfood  = new WetFood();
            string expected = "WetFood";

            //--Act
            string actual = wetfood.FoodType;

            //--Assert
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void AddGoodTest()   // Test add new goods
        //--Arrange
        {
            ZooGoods new1 = new WetFood();

            new1.ProductCode = 1;
            ZooGoods.AddZooGood(new1);
            ZooGoods new2 = new DryFood();

            new2.ProductCode = 2;
            ZooGoods.AddZooGood(new2);

            //--Act
            ZooGoods goods1 = ZooGoods.GetGood(1);

            //--Assert
            Assert.AreEqual(goods1, new1);
        }