Esempio n. 1
0
        public void QuantityRemaining_test()
        {
            //arrange
            VendingMachineSlot slot = SetupHershys();

            //act
            slot.Pop();

            //assert
            Assert.AreEqual("4", slot.QuantityRemainingDisplayString);
        }
Esempio n. 2
0
        public void ItemCategory_SoldOut_test()
        {
            //arrange
            VendingMachineSlot slot = SetupHershys();

            //act
            while (slot.Count > 0)
            {
                slot.Pop();//empty the slot
            }

            //assert
            Assert.AreEqual(null, slot.ItemCategory);
        }
Esempio n. 3
0
        public void QuantityRemaining_SoldOut_Test()
        {
            //arrange
            VendingMachineSlot slot = SetupHershys();

            //act
            while (slot.Count > 0)
            {
                slot.Pop();//empty the slot
            }

            //assert
            Assert.AreEqual(VendingMachineSlot.DISPLAY_QUANTITY_SOLD_OUT, slot.QuantityRemainingDisplayString);
        }
Esempio n. 4
0
        public void ToString_SoldOut_Test()
        {
            //arrange
            VendingMachineSlot slot = SetupHershys();

            //act
            while (slot.Count > 0)
            {
                slot.Pop();//empty the slot
            }
            string result = slot.ToString();

            //assert
            Assert.AreEqual($"{VendingMachineSlot.DISPLAY_QUANTITY_SOLD_OUT}|$2.00|Hershey's", result);
        }