Пример #1
0
        public void Setup()
        {
            _bag = A.Dummy<Bag>();
            A.CallTo(() => _bag.Name).Returns("A bag");

            _box = A.Dummy<Box>();
            A.CallTo(() => _box.Name).Returns("A box");
            A.CallTo(() => _box.Bag.Name).Returns(_bag.Name);
        }
Пример #2
0
 private void AddBoxToQueue(Box box)
 {
     Console.WriteLine("Adding box to closing queue...");
     box.State = BoxState.Closed;
     _closedBoxes.Add(box);
 }
Пример #3
0
 public Box CloseBox(Box box)
 {
     Console.WriteLine("Closing box...");
     AddBoxToQueue(box);
     return GetClosedBox(box.Identifier);
 }