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 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

◆ TEST_F() [1/16]

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

Definition at line 74 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [2/16]

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 94 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [3/16]

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 116 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [4/16]

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 140 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [5/16]

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 178 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [6/16]

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 222 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [7/16]

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 283 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [8/16]

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 345 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [9/16]

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 383 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [10/16]

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 443 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [11/16]

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 504 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [12/16]

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 558 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [13/16]

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 614 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [14/16]

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 671 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [15/16]

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 728 of file unittest_canopen_braketest_adapter.cpp.

◆ TEST_F() [16/16]

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 786 of file unittest_canopen_braketest_adapter.cpp.

Variable Documentation

◆ BRAKE_TEST_DURATION_OBJECT_INDEX

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

Definition at line 45 of file unittest_canopen_braketest_adapter.cpp.

◆ BRAKE_TEST_SERVICE_NAME

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

Definition at line 43 of file unittest_canopen_braketest_adapter.cpp.

◆ BRAKE_TEST_STATUS_OBJECT_INDEX

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

Definition at line 47 of file unittest_canopen_braketest_adapter.cpp.

◆ BRAKETEST_REQUIRED_NAME

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

Definition at line 50 of file unittest_canopen_braketest_adapter.cpp.

◆ NODE_NAMES_PARAMETER_NAME

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

Definition at line 49 of file unittest_canopen_braketest_adapter.cpp.

◆ NODE_NAMES_PREFIX

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

Definition at line 51 of file unittest_canopen_braketest_adapter.cpp.

◆ NODE_TEST_SET

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

Definition at line 52 of file unittest_canopen_braketest_adapter.cpp.

◆ START_BRAKE_TEST_OBJECT_INDEX

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

Definition at line 46 of file unittest_canopen_braketest_adapter.cpp.



prbt_hardware_support
Author(s):
autogenerated on Wed Nov 25 2020 03:10:38