17 #ifndef CARTOGRAPHER_CLOUD_INTERNAL_TESTING_HANDLER_TEST_H 18 #define CARTOGRAPHER_CLOUD_INTERNAL_TESTING_HANDLER_TEST_H 20 #include "async_grpc/testing/rpc_handler_test_server.h" 24 #include "gtest/gtest.h" 32 using ::testing::Return;
33 using ::testing::Test;
35 template <
typename HandlerConcept,
typename HandlerType>
40 async_grpc::testing::RpcHandlerTestServer<HandlerConcept, HandlerType>>(
41 common::make_unique<MockMapBuilderContext>());
44 ->template GetUnsynchronizedContext<MockMapBuilderContext>();
46 common::make_unique<MockLocalTrajectoryUploader>();
51 .Times(::testing::AnyNumber())
52 .WillRepeatedly(::testing::ReturnPointee(mock_map_builder_.get()));
53 EXPECT_CALL(*mock_map_builder_, pose_graph())
54 .Times(::testing::AnyNumber())
55 .WillRepeatedly(Return(mock_pose_graph_.get()));
60 .WillOnce(Return(
nullptr));
70 async_grpc::testing::RpcHandlerTestServer<HandlerConcept, HandlerType>>
82 #endif // CARTOGRAPHER_CLOUD_INTERNAL_TESTING_HANDLER_TEST_H
MockMapBuilderContext * mock_map_builder_context_
_Unique_if< T >::_Single_object make_unique(Args &&... args)
std::unique_ptr< async_grpc::testing::RpcHandlerTestServer< HandlerConcept, HandlerType > > test_server_
std::unique_ptr< mapping::testing::MockMapBuilder > mock_map_builder_
void SetNoLocalTrajectoryUploader()
void SetMockLocalTrajectoryUploader()
std::unique_ptr< MockLocalTrajectoryUploader > mock_local_trajectory_uploader_
std::unique_ptr< mapping::testing::MockPoseGraph > mock_pose_graph_