16 #include <gtest/gtest.h> 17 #include <gmock/gmock.h> 19 #include <aws/core/Aws.h> 26 using ::testing::Return;
27 using ::testing::AtLeast;
37 MOCK_METHOD0(SetDefaultCallbacks,
bool());
50 streamer_node_ = std::make_shared<StreamerNode>(
"~");
51 mock_subscription_installer_ = std::make_shared<MockRosStreamSubscriptionInstaller>(*streamer_node_);
52 streamer_node_->set_subscription_installer(mock_subscription_installer_);
57 streamer_node_.reset();
58 mock_subscription_installer_.reset();
69 EXPECT_CALL(*mock_subscription_installer_, SetDefaultCallbacks())
70 .Times(AtLeast(1)).WillRepeatedly(Return(
true));
75 int main(
int argc,
char ** argv)
77 Aws::SDKOptions options_;
78 Aws::InitAPI(options_);
80 testing::InitGoogleMock(&argc, argv);
82 ros::init(argc, argv,
"test_streamer_node");
84 n.
setParam(
"aws_client_configuration/region",
"us-west-2");
85 int ret = RUN_ALL_TESTS();
enum Aws::Kinesis::kinesis_manager_status_e KinesisManagerStatus
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
#define KINESIS_MANAGER_STATUS_SUCCEEDED(status)
int main(int argc, char **argv)
void(* ImageTransportCallbackFn)(const KinesisStreamManagerInterface &stream_manager, std::string stream_name, const sensor_msgs::ImageConstPtr &image)
std::shared_ptr< StreamerNode > streamer_node_
std::shared_ptr< MockRosStreamSubscriptionInstaller > mock_subscription_installer_
TEST_F(TestStreamerNode, CreateNode)
MockRosStreamSubscriptionInstaller(ros::NodeHandle &handle)
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const