Classes | Functions | Variables
canopen_braketest_adapter_test Namespace Reference

Classes

class  CanOpenBraketestAdapterTest
 

Functions

 TEST_F (CanOpenBraketestAdapterTest, testCANOpenBrakeTestAdapterExceptionDtor)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutCANGetService)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutCANSetService)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutNodeParameters)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithNodeParametersTypeError)
 
 TEST_F (CanOpenBraketestAdapterTest, testGetBrakeTestDurationServiceCallFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testGetBrakeTestDurationServiceResponseFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceCallSuccess)
 
 TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceCallFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceResponseFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusServiceCallFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusServiceResponseFailure)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusUnknown)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusPerformed)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusNotSuccessful)
 
 TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusNotActivelyControlled)
 

Variables

static const std::string BRAKE_TEST_DURATION_OBJECT_INDEX {"2060sub1"}
 
static const std::string BRAKE_TEST_SERVICE_NAME {"/prbt/braketest_adapter_node/trigger_braketest"}
 
static const std::string BRAKE_TEST_STATUS_OBJECT_INDEX {"2060sub3"}
 
static const std::string BRAKETEST_REQUIRED_NAME {"braketest_required"}
 
static constexpr int NODE_COUNT {6}
 
static const std::string NODE_NAMES_PARAMETER_NAME {"/prbt/driver/nodes"}
 
static const std::string NODE_NAMES_PREFIX {"prbt_joint_"}
 
static const std::vector< size_t > NODE_TEST_SET {{0, 2, 5}}
 
static const std::string START_BRAKE_TEST_OBJECT_INDEX {"2060sub2"}
 

Function Documentation

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testCANOpenBrakeTestAdapterExceptionDtor   
)
  • Test increases function coverage by ensuring that all Dtor variants are called. (Spec)

Definition at line 78 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestServiceWithoutCANGetService   
)
  • Test execution of brake tests without the CAN get service. (Spec)

Test Sequence:

  1. Shutdown CAN get service mock.
  2. Call brake test service.

Expected Results:

  1. -
  2. Brake test service responds with correct error case.

Definition at line 98 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestServiceWithoutCANSetService   
)
  • Test execution of brake tests without the CAN set service. (Spec)

Test Sequence:

  1. Shutdown CAN set service mock.
  2. Call brake test service.

Expected Results:

  1. -
  2. Brake test service responds with correct error case.

Definition at line 121 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestServiceWithoutNodeParameters   
)
  • Test execution of brake tests without node names on the parameter server. (Spec)

Test Sequence:

  1. Delete node names parameter.
  2. Call brake test service.
  3. Restore node names parameter.

Expected Results:

  1. -
  2. Brake test service responds with correct error case.
  3. -

Definition at line 146 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestServiceWithNodeParametersTypeError   
)
  • Test execution of brake tests with an error type in the node braketest_required parameter. (Spec)

Test Sequence:

  1. Modify the parameter by setting a int (bool is expected)
  2. Call brake test service.
  3. Restore node names parameter.

Expected Results:

  1. -
  2. Brake test service responds with correct error case.
  3. -

Definition at line 184 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testGetBrakeTestDurationServiceCallFailure   
)
  • Test execution of brake tests when the service call getting the brake_test_duration object fails. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let service call getting the brake_test_duration object fail for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is:
    • at least one read request on the brake_test_duration object for the selected node,
    • no write request for the selected node.

Definition at line 228 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testGetBrakeTestDurationServiceResponseFailure   
)
  • Test execution of brake tests when the service call getting the brake_test_duration object responds an error. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let service call getting the brake_test_duration object respond an error for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is:
    • at least one read request on the brake_test_duration object for the selected node,
    • no write request for the selected node.

Definition at line 288 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testStartBrakeTestServiceCallSuccess   
)
  • Test successful execution of brake tests. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with success.
  3. There is:
    • at least one read request on brake_test_duration object for the selected node,
    • exactly one write request for the selected node.

Definition at line 350 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testStartBrakeTestServiceCallFailure   
)
  • Test execution of brake tests when the service call setting the start_brake_test object fails. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the start_brake_test object fail for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is:
    • at least one read request on brake_test_duration object for the selected node,
    • exactly one write request for the selected node.

Definition at line 388 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testStartBrakeTestServiceResponseFailure   
)
  • Test execution of brake tests when the service call setting the start_brake_test object responds an error. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the start_brake_test object respond an error for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is:
    • at least one read request on brake_test_duration object for the selected node,
    • exactly one write request for the selected node.

Definition at line 447 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusServiceCallFailure   
)
  • Test execution of brake tests when the service call getting the brake_test_status object fails. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let all services respond success, but let the service call getting the brake_test_status object fail for a selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 507 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusServiceResponseFailure   
)
  • Test execution of brake tests when the service call getting the brake_test_status object responds an error. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the brake_test_status object respond an error for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 561 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusUnknown   
)
  • Test execution of brake tests when the brake_test_status is unknown. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the brake_test_status object respond status unknown for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 617 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusPerformed   
)
  • Test execution of brake tests when the brake_test_status is performed. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the brake_test_status object respond status performed for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 674 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusNotSuccessful   
)
  • Test execution of brake tests when the brake_test_status is not successful. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the brake_test_status object respond status not successful for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 731 of file unittest_canopen_braketest_adapter.cpp.

canopen_braketest_adapter_test::TEST_F ( CanOpenBraketestAdapterTest  ,
testBrakeTestStatusNotActivelyControlled   
)
  • Test execution of brake tests when the brake_test_status is not actively controlled. (Spec)

This is repeated for the first and the last node and one in between.

Test Sequence:

  1. Set expectations on CANOpen mock object. Let the service call getting the brake_test_status object respond status not actively controlled for the selected node.
  2. Call brake test service.
  3. Verify and clear expectations.

Expected Results:

  1. -
  2. The brake test service responds with correct error case.
  3. There is at least one read request on brake_test_status object for the selected node.

Definition at line 789 of file unittest_canopen_braketest_adapter.cpp.

Variable Documentation

const std::string canopen_braketest_adapter_test::BRAKE_TEST_DURATION_OBJECT_INDEX {"2060sub1"}
static

Definition at line 47 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::BRAKE_TEST_SERVICE_NAME {"/prbt/braketest_adapter_node/trigger_braketest"}
static

Definition at line 45 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::BRAKE_TEST_STATUS_OBJECT_INDEX {"2060sub3"}
static

Definition at line 49 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::BRAKETEST_REQUIRED_NAME {"braketest_required"}
static

Definition at line 52 of file unittest_canopen_braketest_adapter.cpp.

constexpr int canopen_braketest_adapter_test::NODE_COUNT {6}
static

Definition at line 54 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::NODE_NAMES_PARAMETER_NAME {"/prbt/driver/nodes"}
static

Definition at line 51 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::NODE_NAMES_PREFIX {"prbt_joint_"}
static

Definition at line 53 of file unittest_canopen_braketest_adapter.cpp.

const std::vector<size_t> canopen_braketest_adapter_test::NODE_TEST_SET {{0, 2, 5}}
static

Definition at line 55 of file unittest_canopen_braketest_adapter.cpp.

const std::string canopen_braketest_adapter_test::START_BRAKE_TEST_OBJECT_INDEX {"2060sub2"}
static

Definition at line 48 of file unittest_canopen_braketest_adapter.cpp.



prbt_hardware_support
Author(s):
autogenerated on Tue Feb 2 2021 03:50:18