Google Cloud Pub/Sub C++ Client  2.1.0
A C++ Client Library for Google Cloud Pub/Sub
mock_schema_admin_connection.h
Go to the documentation of this file.
1 // Copyright 2021 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_ADMIN_CONNECTION_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_ADMIN_CONNECTION_H
17 
18 #include "google/cloud/pubsub/schema_admin_connection.h"
19 #include <gmock/gmock.h>
20 
21 namespace google {
22 namespace cloud {
23 namespace pubsub {
25 
26 /**
27  * A googlemock-based mock for
28  * [pubsub::SchemaAdminConnection][mocked-link]
29  *
30  * [mocked-link]: @ref google::cloud::pubsub::SchemaAdminConnection
31  */
33  public:
34  MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, CreateSchema,
35  (google::pubsub::v1::CreateSchemaRequest const&), (override));
36 
37  MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, GetSchema,
38  (google::pubsub::v1::GetSchemaRequest const&), (override));
39 
40  MOCK_METHOD(ListSchemasRange, ListSchemas,
41  (google::pubsub::v1::ListSchemasRequest const&), (override));
42 
43  MOCK_METHOD(Status, DeleteSchema,
44  (google::pubsub::v1::DeleteSchemaRequest const&), (override));
45 
46  MOCK_METHOD(StatusOr<google::pubsub::v1::ValidateSchemaResponse>,
47  ValidateSchema,
48  (google::pubsub::v1::ValidateSchemaRequest const&), (override));
49 
50  MOCK_METHOD(StatusOr<google::pubsub::v1::ValidateMessageResponse>,
51  ValidateMessage,
52  (google::pubsub::v1::ValidateMessageRequest const&), (override));
53 };
54 
56 } // namespace pubsub
57 } // namespace cloud
58 } // namespace google
59 
60 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_ADMIN_CONNECTION_H