public void should_not_return_bag_given_used_ticket_when_pick() { Bag aBag = new Bag(); Cabinet cabinet = new Cabinet(50); var directInstance = new Direct(cabinet); Ticket ticket = directInstance.Store(aBag); directInstance.Pick(ticket); Assert.IsNull(directInstance.Pick(ticket)); }
public void should_return_bag_given_valid_ticket_when_pick() { Bag aBag = new Bag(); Bag anotherBag = new Bag(); Cabinet cabinet = new Cabinet(50); var directInstance = new Direct(cabinet); Ticket ticket = directInstance.Store(aBag); var resultTicket = directInstance.Pick(ticket); Assert.AreEqual(aBag, resultTicket); Assert.AreNotEqual(anotherBag, resultTicket); }