public void IceNukaTestCase()
        {
            NukaCola iceNukaCola = new IceNuka();

            Assert.AreEqual(200, iceNukaCola.getPrice());
            Assert.AreEqual("Ice Nuka Cola", iceNukaCola.getName());
        }
コード例 #2
0
        public void MakeDiscountToIceNukaCola()
        {
            VendingMachine a           = new VendingMachine();
            NukaCola       iceNukaCola = new IceNuka();
            int            expected    = 150;
            int            actual      = (int)a.CalculateDiscount(iceNukaCola.getPrice()); //%25 discount to 200

            Assert.AreEqual(expected, actual);
        }
        public void IceNukaTestCase2()
        {
            NukaCola iceNukaCola = new IceNuka();

            Assert.IsInstanceOfType(iceNukaCola, typeof(NukaCola));
        }