Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
mock_schema_connection.h
1// Copyright 2023 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// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/pubsub/v1/schema.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_CONNECTION_H
21
22#include "google/cloud/pubsub/schema_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace pubsub_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `SchemaServiceConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `SchemaServiceClient`. To do so,
35 * construct an object of type `SchemaServiceClient` with an instance of this
36 * class. Then use the Google Test framework functions to program the behavior
37 * of this mock.
38 *
39 * @see [This example][bq-mock] for how to test your application with GoogleTest.
40 * While the example showcases types from the BigQuery library, the underlying
41 * principles apply for any pair of `*Client` and `*Connection`.
42 *
43 * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock}
44 */
46 public:
47 MOCK_METHOD(Options, options, (), (override));
48
49 MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, CreateSchema,
50 (google::pubsub::v1::CreateSchemaRequest const& request),
51 (override));
52
53 MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, GetSchema,
54 (google::pubsub::v1::GetSchemaRequest const& request),
55 (override));
56
57 MOCK_METHOD(StreamRange<google::pubsub::v1::Schema>, ListSchemas,
58 (google::pubsub::v1::ListSchemasRequest request), (override));
59
60 MOCK_METHOD(StreamRange<google::pubsub::v1::Schema>, ListSchemaRevisions,
61 (google::pubsub::v1::ListSchemaRevisionsRequest request),
62 (override));
63
64 MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, CommitSchema,
65 (google::pubsub::v1::CommitSchemaRequest const& request),
66 (override));
67
68 MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, RollbackSchema,
69 (google::pubsub::v1::RollbackSchemaRequest const& request),
70 (override));
71
72 MOCK_METHOD(StatusOr<google::pubsub::v1::Schema>, DeleteSchemaRevision,
73 (google::pubsub::v1::DeleteSchemaRevisionRequest const& request),
74 (override));
75
76 MOCK_METHOD(Status, DeleteSchema,
77 (google::pubsub::v1::DeleteSchemaRequest const& request),
78 (override));
79
80 MOCK_METHOD(StatusOr<google::pubsub::v1::ValidateSchemaResponse>,
81 ValidateSchema,
82 (google::pubsub::v1::ValidateSchemaRequest const& request),
83 (override));
84
85 MOCK_METHOD(StatusOr<google::pubsub::v1::ValidateMessageResponse>,
86 ValidateMessage,
87 (google::pubsub::v1::ValidateMessageRequest const& request),
88 (override));
89};
90
91GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
92} // namespace pubsub_mocks
93} // namespace cloud
94} // namespace google
95
96#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_MOCKS_MOCK_SCHEMA_CONNECTION_H
The SchemaServiceConnection object for SchemaServiceClient.
Definition: schema_connection.h:61
A class to mock SchemaServiceConnection.
Definition: mock_schema_connection.h:45
A namespace for googlemock-based Cloud Pub/Sub C++ client mocks.
Definition: mock_ack_handler.h:25
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.