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 {
31 {
32 public:
37 
43  void setDefaultActions();
44 
50  void expectAnything();
51 
55  void shutdown();
56 
61  void shutdownSetService();
65  void shutdownGetService();
66 
67 public:
68  MOCK_METHOD2(get_obj, bool(canopen_chain_node::GetObjectRequest&, canopen_chain_node::GetObjectResponse&));
69  MOCK_METHOD2(set_obj, bool(canopen_chain_node::SetObjectRequest&, canopen_chain_node::SetObjectResponse&));
70 
71 private:
75 };
76 
77 } // namespace prbt_hardware_support
78 
79 #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 Wed Nov 25 2020 03:10:38