public moveAxisConveyer ( enumLeftRight _elrDirection ) : void | ||
_elrDirection | enumLeftRight | |
return | void |
public void moveAxisConveyer_ReturnsFalse_CastExceptions() { // Setup IRobot irMock = MockRepository.GenerateMock<IRobot>(); mcTestObj = new ManualController(); mcTestObj.RobotConnection = irMock; irMock.Stub(t => t.moveConveyerBelt(Arg<int>.Is.Anything)).Return(false); // Verify Assert.Catch(() => mcTestObj.moveAxisConveyer(enumLeftRight.MANUAL_MOVE_RIGHT)); }
public void moveAxisConveyer_CalledWithArgRight_CallsRobotmoveConveyerBeltWithPositiveSpeedValue() { // Setup IRobot irMock = MockRepository.GenerateMock<IRobot>(); mcTestObj = new ManualController(); mcTestObj.RobotConnection = irMock; mcTestObj.Speed = 50; irMock.Stub(t => t.moveConveyerBelt(Arg<int>.Is.Anything)).Return(true); // Test mcTestObj.moveAxisConveyer(enumLeftRight.MANUAL_MOVE_RIGHT); // Verify irMock.AssertWasCalled(t => t.moveConveyerBelt(mcTestObj.Speed)); }