canopen_chain_node_mock.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Pilz GmbH & Co. KG
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13 
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef PRBT_HARDWARE_SUPPORT_CANOPEN_CHAIN_NODE_MOCK_H
19 #define PRBT_HARDWARE_SUPPORT_CANOPEN_CHAIN_NODE_MOCK_H
20 
21 #include <gtest/gtest.h>
22 #include <gmock/gmock.h>
23 
24 #include <ros/ros.h>
25 #include <canopen_chain_node/GetObject.h>
26 #include <canopen_chain_node/SetObject.h>
27 
28 namespace prbt_hardware_support
29 {
30 
32 {
33 public:
38 
44  void setDefaultActions();
45 
51  void expectAnything();
52 
56  void shutdown();
57 
62  void shutdownSetService();
66  void shutdownGetService();
67 
68 
69 public:
70  MOCK_METHOD2(get_obj, bool(canopen_chain_node::GetObjectRequest &, canopen_chain_node::GetObjectResponse &));
71  MOCK_METHOD2(set_obj, bool(canopen_chain_node::SetObjectRequest &, canopen_chain_node::SetObjectResponse &));
72 
73 private:
77 };
78 
79 } //namespace brake_test_executor_test
80 
81 #endif
void expectAnything()
Set expectations on all mock methods, that can be fullfilled in any case.
void shutdownSetService()
Un-advertise the set service.
void shutdownGetService()
Un-advertise the get service.
MOCK_METHOD2(get_obj, bool(canopen_chain_node::GetObjectRequest &, canopen_chain_node::GetObjectResponse &))
void setDefaultActions()
Set default actions on all expected service calls.
CANOpenChainNodeMock()
Advertise get_object and set_object services for CANOpen objects and call setDefaultActions().


prbt_hardware_support
Author(s):
autogenerated on Tue Feb 2 2021 03:50:17