예제 #1
0
        public void GetDryFoodGoodsTypeTest()  // Test return correct Dry Goods Type
        //--Arrange
        {
            var    dryfood  = new DryFood();
            string expected = "DryFood";

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

            //--Assert
            Assert.AreEqual(expected, actual);
        }
예제 #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);
        }