public void should_return_null_given_used_ticket_when_pick()
 {
     var cabinet = new Cabinet(boxNumber);
     Bag newbag = new Bag();
     Ticket ticket = cabinet.Store(newbag);
     cabinet.Pick(ticket);
     Assert.IsNull(cabinet.Pick(ticket));
 }
Beispiel #2
0
        public void Pick_Return_NULL_When_Give_InValid_Ticket()
        {
            int nBox = 3;
            var cabinet = new Cabinet(nBox);
            var myBag = new Bag();
            var ticket = cabinet.Store(myBag);
            cabinet.Pick(ticket);

            Assert.IsNull(cabinet.Pick(ticket));
        }
        public void should_return_null_given_invalid_ticket_when_pick()
        {
            Cabinet cabinet = new Cabinet(boxNumber);

            Ticket ticket = new Ticket();
            Assert.IsNull(cabinet.Pick(ticket));
        }
        public void should_return_bag_given_valid_ticket_when_pick()
        {
            Bag aBag = new Bag();
            Cabinet cabinet = new Cabinet(boxNumber);

            Ticket ticket = cabinet.Store(aBag);
            Assert.AreEqual(aBag, cabinet.Pick(ticket));
        }
Beispiel #5
0
        public void Pick_One_Bag_When_Cabinet_Has_My_Bag_And_Give_Valid_Ticket()
        {
            int nBox = 3;
            var cabinet = new Cabinet(nBox);
            var myBag = new Bag();
            var ticket = cabinet.Store(myBag);

            Bag returnBag = cabinet.Pick(ticket);

            Assert.AreEqual(myBag, returnBag);
        }