Classes | Functions
brake_test_executor_test Namespace Reference

Classes

class  BrakeTestServiceMock
 
class  SendBrakeTestResltServiceMock
 
class  SystemMock
 
class  TriggerServiceMock
 

Functions

 MATCHER (IsRequestResultFalse, "")
 
 TEST (BrakeTestExecutorTest, testBrakeTestTriggeringRobotNotMoving)
 
 TEST (BrakeTestExecutorTest, testBrakeTestServiceWithRobotMotion)
 
 TEST (BrakeTestExecutorTest, testBrakeTestServiceTriggerFails)
 
 TEST (BrakeTestExecutorTest, testBrakeTestResultServiceFails)
 
 TEST (BrakeTestExecutorTest, testMissingHoldFunc)
 Checks that exception is thrown if function to hold controller is missing. More...
 
 TEST (BrakeTestExecutorTest, testMissingUnholdFunc)
 Checks that exception is thrown if function to unhold controller is missing. More...
 
 TEST (BrakeTestExecutorTest, testMissingDetectMotionFunc)
 Checks that exception is thrown if function to detect robot motion is missing. More...
 
 TEST (BrakeTestExecutorTest, testMissingExecuteBrakeTestFunc)
 Checks that exception is thrown if function to execute brake test on robot is missing. More...
 
 TEST (BrakeTestExecutorTest, testMissingSendBrakeTestResultFunc)
 Checks that exception is thrown if function to send brake test result is missing. More...
 
 TEST (BrakeTestExecutorTest, testDtorBrakeTestExecutorException)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 TEST (BrakeTestExecutorTest, testTriggerServiceCallFailure)
 Tests case that trigger service fails. More...
 
 TEST (BrakeTestExecutorTest, testTriggerServiceCallResponseFalse)
 Tests what happens in case service is response is false (Tests mainly exists to complete code coverage). More...
 
 TEST (BrakeTestExecutorTest, testExecuteBrakeTestCallFailure)
 Tests that: More...
 
 TEST (BrakeTestExecutorTest, testSendBrakeTestResultCallFailure)
 Tests that false is returned if SendBrakeTestResult service fails. More...
 
 TEST (BrakeTestExecutorTest, testSendBrakeTestResultCallSuccess)
 Tests that SendBrakeTestResult service is called with correct value. More...
 

Function Documentation

◆ MATCHER()

brake_test_executor_test::MATCHER ( IsRequestResultFalse  ,
""   
)

Definition at line 361 of file unittest_brake_test_executor.cpp.

◆ TEST() [1/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testBrakeTestTriggeringRobotNotMoving   
)
  • Test execution of brake tests while robot is not moving. (Spec)

Test Sequence:

  • Set expectations and action on service calls + Call brake test service

Expected Results:

  • Brake tests are executed successfully. In strict order:
    • Hold mode is triggered
    • Brake test execution is triggered
    • Unhold is triggered

Definition at line 63 of file unittest_brake_test_executor.cpp.

◆ TEST() [2/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testBrakeTestServiceWithRobotMotion   
)
  • Test execution of brake tests while robot is moving. (Spec)

Test Sequence:

  1. Set expectations and action on service calls + Call brake test service.

Expected Results:

  1. Brake tests cannot be triggered. Respective error message is returned. The hold service is not called.

Definition at line 105 of file unittest_brake_test_executor.cpp.

◆ TEST() [3/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testBrakeTestServiceTriggerFails   
)
  • Test behaviour if the triggering of the braketest fails. (Spec)

Test Sequence:

  1. Set expectations and action on the service call (Return false as response on call.) + Call brake test service.

Expected Results:

  1. Error is returned upon service call. In strict order:
    • Hold mode is triggered
    • Brake test execution is triggered
    • Unhold is triggered

Definition at line 139 of file unittest_brake_test_executor.cpp.

◆ TEST() [4/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testBrakeTestResultServiceFails   
)
  • Test behaviour if the sending of the brake test result fails. (Spec)

Test Sequence:

  1. Set expectations + Call brake test service.

Expected Results:

  1. Function returns false and error code matches expected error code.

Definition at line 179 of file unittest_brake_test_executor.cpp.

◆ TEST() [5/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testMissingHoldFunc   
)

Checks that exception is thrown if function to hold controller is missing.

Definition at line 210 of file unittest_brake_test_executor.cpp.

◆ TEST() [6/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testMissingUnholdFunc   
)

Checks that exception is thrown if function to unhold controller is missing.

Definition at line 224 of file unittest_brake_test_executor.cpp.

◆ TEST() [7/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testMissingDetectMotionFunc   
)

Checks that exception is thrown if function to detect robot motion is missing.

Definition at line 238 of file unittest_brake_test_executor.cpp.

◆ TEST() [8/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testMissingExecuteBrakeTestFunc   
)

Checks that exception is thrown if function to execute brake test on robot is missing.

Definition at line 252 of file unittest_brake_test_executor.cpp.

◆ TEST() [9/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testMissingSendBrakeTestResultFunc   
)

Checks that exception is thrown if function to send brake test result is missing.

Definition at line 266 of file unittest_brake_test_executor.cpp.

◆ TEST() [10/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testDtorBrakeTestExecutorException   
)

Test increases function coverage by ensuring that all Dtor variants are called.

Definition at line 280 of file unittest_brake_test_executor.cpp.

◆ TEST() [11/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testTriggerServiceCallFailure   
)

Tests case that trigger service fails.

Definition at line 295 of file unittest_brake_test_executor.cpp.

◆ TEST() [12/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testTriggerServiceCallResponseFalse   
)

Tests what happens in case service is response is false (Tests mainly exists to complete code coverage).

Definition at line 308 of file unittest_brake_test_executor.cpp.

◆ TEST() [13/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testExecuteBrakeTestCallFailure   
)

Tests that:

  • false is returned if BrakeTest service fails,
  • correct error code is returned if BrakeTest service fails.

Definition at line 331 of file unittest_brake_test_executor.cpp.

◆ TEST() [14/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testSendBrakeTestResultCallFailure   
)

Tests that false is returned if SendBrakeTestResult service fails.

Definition at line 352 of file unittest_brake_test_executor.cpp.

◆ TEST() [15/15]

brake_test_executor_test::TEST ( BrakeTestExecutorTest  ,
testSendBrakeTestResultCallSuccess   
)

Tests that SendBrakeTestResult service is called with correct value.

Definition at line 369 of file unittest_brake_test_executor.cpp.



prbt_hardware_support
Author(s):
autogenerated on Thu Nov 19 2020 03:11:51