homeRobot() public méthode

public homeRobot ( ) : bool
Résultat bool
        public void moveByPitch_IsCalled_ReturnFalse()
        {
            IWrapper wp = MockRepository.GenerateStub<IWrapper>();
            SerialSTK serialSTK = MockRepository.GenerateStub<SerialSTK>(9600, Parity.None, 8, StopBits.One);
            Robot robot = new Robot();

            wp.Stub(t => t.moveManualWrapped(Arg<Wrapper.enumManualModeWhat>.Is.Equal(Wrapper.enumManualModeWhat.MANUAL_MOVE_PITCH), Arg<int>.Is.Equal(10))).Return(false);

            robot.wrapper = wp;
            robot.STK = serialSTK;
            robot.homeRobot();

            Assert.IsFalse(robot.moveByPitch(10));
        }
        public void moveByZCoordinate_IsCalled()
        {
            IWrapper wp = MockRepository.GenerateStub<IWrapper>();
            SerialSTK serialSTK = MockRepository.GenerateStub<SerialSTK>(9600, Parity.None, 8, StopBits.One);
            Robot robot = new Robot();

            wp.Stub(t => t.moveManualWrapped(Arg<Wrapper.enumManualModeWhat>.Is.Equal(Wrapper.enumManualModeWhat.MANUAL_MOVE_Z), Arg<int>.Is.Equal(10))).Return(true);

            robot.wrapper = wp;
            robot.STK = serialSTK;
            robot.homeRobot();

            robot.moveByZCoordinate(10);

            wp.AssertWasCalled(t => t.moveManualWrapped(Arg<Wrapper.enumManualModeWhat>.Is.Equal(Wrapper.enumManualModeWhat.MANUAL_MOVE_Z), Arg<int>.Is.Equal(10)));
        }
        public void HomeRobot_IsCalled()
        {
            IWrapper wp = MockRepository.GenerateStub<IWrapper>();
            SerialSTK serialSTK = MockRepository.GenerateStub<SerialSTK>(9600, Parity.None,8, StopBits.One);
            Robot robot = new Robot();

            wp.Stub(t => t.homeWrapped(Arg<Wrapper.enumAxisSettings>.Is.Equal(Wrapper.enumAxisSettings.AXIS_ROBOT), Arg<DLL.DgateCallBackByteRefArg>.Is.Anything)).Return(true);

            robot.wrapper = wp;
            robot.STK = serialSTK;

            Assert.IsTrue(robot.homeRobot());
        }