public void GivenOneTicketDispenser_WhenGetTurnTicket_ThenIncrementTurnNumber() { TicketDispenser td = new TicketDispenser(); Assert.AreEqual(0, td.GetTurnTicket().TurnNumber); Assert.AreEqual(1, td.GetTurnTicket().TurnNumber); Assert.AreEqual(2, td.GetTurnTicket().TurnNumber); }
public void GivenMultipleTicketDispensers_WhenGetTurnTicketInAnyDispenser_ThenAlwaysIncrementTurnNumber() { TicketDispenser td1 = new TicketDispenser(); TicketDispenser td2 = new TicketDispenser(); TicketDispenser td3 = new TicketDispenser(); Assert.AreEqual(0, td1.GetTurnTicket().TurnNumber); Assert.AreEqual(1, td2.GetTurnTicket().TurnNumber); Assert.AreEqual(2, td3.GetTurnTicket().TurnNumber); Assert.AreEqual(3, td2.GetTurnTicket().TurnNumber); Assert.AreEqual(4, td3.GetTurnTicket().TurnNumber); Assert.AreEqual(5, td1.GetTurnTicket().TurnNumber); }