Classes | Namespaces | Functions | Variables
unittest_modbus_adapter_brake_test.cpp File Reference
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <functional>
#include <memory>
#include <pilz_msgs/IsBrakeTestRequired.h>
#include <pilz_msgs/IsBrakeTestRequiredResult.h>
#include <prbt_hardware_support/modbus_adapter_brake_test.h>
#include <prbt_hardware_support/modbus_msg_in_builder.h>
#include <prbt_hardware_support/register_container.h>
#include <prbt_hardware_support/modbus_msg_brake_test_wrapper.h>
#include <prbt_hardware_support/modbus_msg_brake_test_wrapper_exception.h>
#include <prbt_hardware_support/modbus_adapter_brake_test_exception.h>
#include <prbt_hardware_support/write_modbus_register_call.h>
#include <pilz_testutils/async_test.h>
Include dependency graph for unittest_modbus_adapter_brake_test.cpp:

Go to the source code of this file.

Classes

class  prbt_hardware_support::ModbusMock
 
class  prbt_hardware_support::ServiceMock
 

Namespaces

 prbt_hardware_support
 

Functions

static ModbusMsgInStampedPtr prbt_hardware_support::createDefaultBrakeTestModbusMsg (const uint16_t brake_test_required_value, const unsigned int modbus_api_version=MODBUS_API_VERSION_REQUIRED, const uint32_t brake_test_required_index=TEST_API_SPEC.getRegisterDefinition(modbus_api_spec::BRAKETEST_REQUEST))
 
int main (int argc, char *argv[])
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testModbusMsgBrakeTestWrapperExceptionDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testModbusMsgBrakeTestWrapperDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testNoMessageReceived)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testBrakeTestRequired)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testBrakeTestNotRequired)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testDisconnect)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testModbusIncorrectApiVersion)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testModbusWithoutApiVersion)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testBrakeTestRequiredRegisterMissing)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testBrakeTestRequiredRegisterUndefinedValue)
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testModbusApiSpecExceptionDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testBrakeTestTriggeringWrongApiDef)
 Test execution of brake tests when there is a problem in the api definition. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testMissingModbusWriteFunc)
 Tests that missing modbus register write functions leads to response.success==false. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testFailingModbusWriteFunc)
 Tests that failing modbus register write functions leads to response.success==false. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testSecondTimeFailingModbusWriteFunc)
 Tests that failing modbus register write functions leads to response.success==false. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testWriteModbusRegisterCallResponseFalse)
 Tests that a service.response=false leads to return value false. More...
 
 prbt_hardware_support::TEST (ModbusAdapterBrakeTestTest, testWriteModbusRegisterCallFailure)
 Tests that a service call failure leads to return value false. More...
 

Variables

static constexpr unsigned int prbt_hardware_support::MODBUS_API_VERSION_REQUIRED { 2 }
 
static const ModbusApiSpec prbt_hardware_support::TEST_API_SPEC
 
static const ModbusApiSpec prbt_hardware_support::TEST_API_WRITE_SPEC
 

Function Documentation

◆ main()

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

Definition at line 462 of file unittest_modbus_adapter_brake_test.cpp.



prbt_hardware_support
Author(s):
autogenerated on Thu May 28 2020 03:13:50