コード例 #1
0
ファイル: RobotManagerTest.cs プロジェクト: flulover/Bootcamp
        public void should_pick_bag_from_robot_when_bag_is_store_in_robot()
        {
            var sequenceLocker = new Locker(1);
            var selfLocker     = new Locker(0);
            var smartRobot     = Robot.CreateSmartRobot(new List <Locker> {
                sequenceLocker
            });
            var robotManager = new RobotManager(
                new List <ILocker>
            {
                selfLocker
            },
                new List <ILocker>
            {
                smartRobot
            }
                );

            var bag    = new Bag();
            var ticket = sequenceLocker.Store(bag);

            Assert.AreSame(bag, robotManager.Pick(ticket));
        }