18 #ifndef PILZ_TESTUTILS_SERVICE_CLIENT_MOCK_H 19 #define PILZ_TESTUTILS_SERVICE_CLIENT_MOCK_H 24 #include <gmock/gmock.h> 44 const CallFunction& call_callback,
45 const LogicalOperatorFunction& negation_operator_callback)
95 using std::placeholders::_1;
96 using std::placeholders::_2;
98 std::bind(&ServiceClientMockFactory::call_named,
this, _1, _2),
99 std::bind(&ServiceClientMockFactory::handle_invalid_named,
this, _1));
103 MOCK_CONST_METHOD2_T(call_named,
bool(
const std::string& name, S&
s));
104 MOCK_CONST_METHOD1_T(handle_invalid_named,
bool(
const std::string& name));
109 #endif // PILZ_TESTUTILS_SERVICE_CLIENT_MOCK_H std::string getService() const
Mock for a ros::ServiceClient, calls are passed through to a given callback (which can be a mock meth...
ServiceClientMock(const std::string &name, const CallFunction &call_callback, const LogicalOperatorFunction &negation_operator_callback)
ServiceClientMock< S > create(const std::string &name, bool)
Returns a ServiceClientMock, which passes service calls to a (named) mock method. ...
#define ROS_DEBUG_NAMED(name,...)
std::function< bool(const std::string &)> LogicalOperatorFunction
CallFunction call_callback_
LogicalOperatorFunction negation_operator_callback_
std::function< bool(const std::string &, S &)> CallFunction
Provides a mock method for service calls for a specific service type.