Ejemplo n.º 1
0
        public void DelegatesToTheHardwareToTurnLeft()
        {
            var room = NewMock <RoomStub>();

            new TurnLeftCommand(HardwareRobot, room).Execute();
            HardwareRobot.AssertWasCalled(robot => robot.TurnLeft());
            room.AssertWasCalled(r => r.TrackCleaning(HardwareRobot));
        }
Ejemplo n.º 2
0
        public void DelegatesToTheHardwareToWalkAnTracksCleaningWithRoom()
        {
            var room = NewMock <RoomStub>();

            new WalkCommand(HardwareRobot, room).Execute();
            HardwareRobot.AssertWasCalled(robot => robot.Walk());
            room.AssertWasCalled(r => r.TrackCleaning(HardwareRobot));
        }
Ejemplo n.º 3
0
 public void ReturnDelegatesToResetMethodOnHardware()
 {
     new Return(HardwareRobot).Execute();
     HardwareRobot.AssertWasCalled(robot => robot.Reset());
 }