Пример #1
0
 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));
 }
Пример #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));
        }
Пример #3
0
        public void should_return_null_given_invalid_ticket_when_pick()
        {
            Cabinet cabinet = new Cabinet(boxNumber);

            Ticket ticket = new Ticket();
            Assert.IsNull(cabinet.Pick(ticket));
        }
Пример #4
0
        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));
        }
Пример #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);
        }