public void ToString_Test() { //arrange VendingMachineSlot slot = SetupHershys(); //act string result = slot.ToString(); //assert Assert.AreEqual("5|$2.00|Hershey's", result); }
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); }