Classes | Namespaces | Functions | Variables
unittest_modbus_adapter_operation_mode.cpp File Reference
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <algorithm>
#include <memory>
#include <pilz_testutils/async_test.h>
#include <prbt_hardware_support/modbus_api_definitions.h>
#include <prbt_hardware_support/modbus_adapter_operation_mode.h>
#include <prbt_hardware_support/modbus_topic_definitions.h>
#include <prbt_hardware_support/OperationModes.h>
#include <prbt_hardware_support/register_container.h>
#include <prbt_hardware_support/modbus_msg_in_builder.h>
Include dependency graph for unittest_modbus_adapter_operation_mode.cpp:

Go to the source code of this file.

Classes

class  prbt_hardware_support::ModbusAdapterOperationModeTest
 Test fixture for unit-tests of the ModbusAdapterOperationMode. More...
 
class  prbt_hardware_support::OperationModeSubscriberMock
 Redirects callbacks of a ros::Subscriber to a mock method. More...
 

Namespaces

 prbt_hardware_support
 

Functions

int main (int argc, char *argv[])
 
 prbt_hardware_support::MATCHER_P (IsExpectedOperationMode, exp_mode, "unexpected operation mode")
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testAdapterOperationModeDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testModbusMsgOperationModeWrapperExceptionDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testModbusMsgOperationModeWrapperDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testInitialOperationMode)
 Tests that initial operation mode is UNKNOWN. More...
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testMissingOperationModeRegister)
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testOperationModeChange)
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testDisconnect)
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testModbusUnexpectedOperationMode)
 
 prbt_hardware_support::TEST_F (ModbusAdapterOperationModeTest, testModbusIncorrectApiVersion)
 

Variables

static constexpr int prbt_hardware_support::DEFAULT_QUEUE_SIZE_MODBUS { 1 }
 
static const std::string prbt_hardware_support::OPERATION_MODE_CALLBACK_EVENT { "operation_mode_callback_event" }
 
static constexpr int prbt_hardware_support::OPERATION_MODE_QUEUE_SIZE { 1 }
 
static const std::vector< uint16_t > prbt_hardware_support::OPERATION_MODES { 1, 2, 3 }
 
static const std::string prbt_hardware_support::SERVICE_NAME_OPERATION_MODE = "/prbt/get_operation_mode"
 
static const ModbusApiSpec prbt_hardware_support::TEST_API_SPEC { { modbus_api_spec::VERSION, 1 }, { modbus_api_spec::OPERATION_MODE, 11 } }
 
static const std::string prbt_hardware_support::TOPIC_OPERATION_MODE { "/prbt/operation_mode" }
 

Function Documentation

◆ main()

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

Definition at line 450 of file unittest_modbus_adapter_operation_mode.cpp.



prbt_hardware_support
Author(s):
autogenerated on Sat Jul 4 2020 03:11:51