Classes | Namespaces | Macros | Functions | Variables
unittest_canopen_braketest_adapter.cpp File Reference
#include <functional>
#include <memory>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <ros/ros.h>
#include <canopen_chain_node/GetObject.h>
#include <canopen_chain_node/SetObject.h>
#include <prbt_hardware_support/canopen_braketest_adapter.h>
#include <prbt_hardware_support/canopen_braketest_adapter_exception.h>
#include <prbt_hardware_support/BrakeTest.h>
#include <prbt_hardware_support/canopen_chain_node_mock.h>
Include dependency graph for unittest_canopen_braketest_adapter.cpp:

Go to the source code of this file.

Classes

class  canopen_braketest_adapter_test::CanOpenBraketestAdapterTest
 

Namespaces

 canopen_braketest_adapter_test
 

Macros

#define DEFAULT_SETUP
 

Functions

int main (int argc, char *argv[])
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testCANOpenBrakeTestAdapterExceptionDtor)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutCANGetService)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutCANSetService)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithoutNodeParameters)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestServiceWithNodeParametersTypeError)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testGetBrakeTestDurationServiceCallFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testGetBrakeTestDurationServiceResponseFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceCallSuccess)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceCallFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testStartBrakeTestServiceResponseFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusServiceCallFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusServiceResponseFailure)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusUnknown)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusPerformed)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusNotSuccessful)
 
 canopen_braketest_adapter_test::TEST_F (CanOpenBraketestAdapterTest, testBrakeTestStatusNotActivelyControlled)
 

Variables

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

Macro Definition Documentation

◆ DEFAULT_SETUP

#define DEFAULT_SETUP
Value:
CANOpenChainNodeMock canopen_chain_node; \
ros::NodeHandle nh_adapter("/prbt/braketest_adapter_node"); \
prbt_hardware_support::CANOpenBrakeTestAdapter canopen_braketest_adapter(nh_adapter); \
ros::ServiceClient brake_test_srv_client = nh_.serviceClient<BrakeTest>(BRAKE_TEST_SERVICE_NAME); \
\
ASSERT_TRUE(brake_test_srv_client.exists()) << "Brake test service not available.";

Definition at line 54 of file unittest_canopen_braketest_adapter.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 827 of file unittest_canopen_braketest_adapter.cpp.



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