15 #ifndef GOOGLE_CLOUD_CPP_SPANNER_GOOGLE_CLOUD_SPANNER_TESTING_MOCK_SPANNER_STUB_H_ 16 #define GOOGLE_CLOUD_CPP_SPANNER_GOOGLE_CLOUD_SPANNER_TESTING_MOCK_SPANNER_STUB_H_ 18 #include "google/cloud/spanner/internal/spanner_stub.h" 20 #include <gmock/gmock.h> 24 namespace spanner_testing {
29 MOCK_METHOD2(CreateSession,
30 StatusOr<google::spanner::v1::Session>(
32 google::spanner::v1::CreateSessionRequest
const&));
34 MOCK_METHOD2(GetSession, StatusOr<google::spanner::v1::Session>(
36 google::spanner::v1::GetSessionRequest
const&));
38 MOCK_METHOD2(ListSessions,
39 StatusOr<google::spanner::v1::ListSessionsResponse>(
41 google::spanner::v1::ListSessionsRequest
const&));
43 MOCK_METHOD2(DeleteSession,
44 Status(grpc::ClientContext&,
45 google::spanner::v1::DeleteSessionRequest
const&));
47 MOCK_METHOD2(ExecuteSql, StatusOr<google::spanner::v1::ResultSet>(
49 google::spanner::v1::ExecuteSqlRequest
const&));
54 grpc::ClientReaderInterface<google::spanner::v1::PartialResultSet>>(
55 grpc::ClientContext&, google::spanner::v1::ExecuteSqlRequest
const&));
57 MOCK_METHOD2(ExecuteBatchDml,
58 StatusOr<google::spanner::v1::ExecuteBatchDmlResponse>(
60 google::spanner::v1::ExecuteBatchDmlRequest
const&));
62 MOCK_METHOD2(Read, StatusOr<google::spanner::v1::ResultSet>(
64 google::spanner::v1::ReadRequest
const&));
69 grpc::ClientReaderInterface<google::spanner::v1::PartialResultSet>>(
70 grpc::ClientContext&, google::spanner::v1::ReadRequest
const&));
72 MOCK_METHOD2(BeginTransaction,
73 StatusOr<google::spanner::v1::Transaction>(
75 google::spanner::v1::BeginTransactionRequest
const&));
77 MOCK_METHOD2(Commit, StatusOr<google::spanner::v1::CommitResponse>(
79 google::spanner::v1::CommitRequest
const&));
81 MOCK_METHOD2(Rollback, Status(grpc::ClientContext&,
82 google::spanner::v1::RollbackRequest
const&));
84 MOCK_METHOD2(PartitionQuery,
85 StatusOr<google::spanner::v1::PartitionResponse>(
87 google::spanner::v1::PartitionQueryRequest
const&));
89 MOCK_METHOD2(PartitionRead,
90 StatusOr<google::spanner::v1::PartitionResponse>(
92 google::spanner::v1::PartitionReadRequest
const&));
100 #endif // GOOGLE_CLOUD_CPP_SPANNER_GOOGLE_CLOUD_SPANNER_TESTING_MOCK_SPANNER_STUB_H_
#define SPANNER_CLIENT_NS