Go to the documentation of this file.00001
00024 #include "gtest/gtest.h"
00025 #include "mcdc3006s_mock.h"
00026 #include "motor_controller_node.h"
00027
00028 using testing::_;
00029 using testing::DoAll;
00030 using testing::SetArgumentPointee;
00031 using testing::AnyNumber;
00032 using testing::Return;
00033
00034 class CallbackCounter : public testing::Test {
00035 protected:
00036
00037 virtual void SetUp()
00038 {
00039 _client = _nh.serviceClient<maggie_motor_controller_msgs::MoveAbsPos>("move_abs_pos");
00040 }
00041
00042
00043 virtual void TearDown()
00044 {
00045 _client.shutdown();
00046 }
00047
00048 ros::NodeHandle _nh;
00049
00050 ros::ServiceClient _client;
00051
00052 public:
00053
00054 };
00055
00056
00057 TEST_F(CallbackCounter, TestCounter_Node)
00058 {
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 }
00078
00079
00080 TEST(MotorControllerNode, SetMaxPos)
00081 {
00082 MockMcdc3006s mock;
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 }
00113
00115
00116 int main(int argc, char **argv)
00117 {
00118 ros::init(argc, argv, "motor_controller_node_tests");
00119
00120 testing::InitGoogleMock(&argc, argv);
00121
00122 return RUN_ALL_TESTS();
00123 }