Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
mock_migration_connection.h
1// Copyright 2022 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/cloud/bigquery/migration/v2/migration_service.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MOCKS_MOCK_MIGRATION_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MOCKS_MOCK_MIGRATION_CONNECTION_H
21
22#include "google/cloud/bigquery/migration/v2/migration_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `MigrationServiceConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `MigrationServiceClient`. To do so,
35 * construct an object of type `MigrationServiceClient` 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]: @googleapis_dev_link{bigquery,bigquery-read-mock.html}
44 */
47 public:
48 MOCK_METHOD(Options, options, (), (override));
49
50 MOCK_METHOD(
51 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>,
52 CreateMigrationWorkflow,
53 (google::cloud::bigquery::migration::v2::
54 CreateMigrationWorkflowRequest const& request),
55 (override));
56
57 MOCK_METHOD(
58 StatusOr<google::cloud::bigquery::migration::v2::MigrationWorkflow>,
59 GetMigrationWorkflow,
60 (google::cloud::bigquery::migration::v2::
61 GetMigrationWorkflowRequest const& request),
62 (override));
63
64 MOCK_METHOD(
65 StreamRange<google::cloud::bigquery::migration::v2::MigrationWorkflow>,
66 ListMigrationWorkflows,
67 (google::cloud::bigquery::migration::v2::ListMigrationWorkflowsRequest
68 request),
69 (override));
70
71 MOCK_METHOD(Status, DeleteMigrationWorkflow,
72 (google::cloud::bigquery::migration::v2::
73 DeleteMigrationWorkflowRequest const& request),
74 (override));
75
76 MOCK_METHOD(Status, StartMigrationWorkflow,
77 (google::cloud::bigquery::migration::v2::
78 StartMigrationWorkflowRequest const& request),
79 (override));
80
81 MOCK_METHOD(
82 StatusOr<google::cloud::bigquery::migration::v2::MigrationSubtask>,
83 GetMigrationSubtask,
84 (google::cloud::bigquery::migration::v2::GetMigrationSubtaskRequest const&
85 request),
86 (override));
87
88 MOCK_METHOD(
89 StreamRange<google::cloud::bigquery::migration::v2::MigrationSubtask>,
90 ListMigrationSubtasks,
91 (google::cloud::bigquery::migration::v2::ListMigrationSubtasksRequest
92 request),
93 (override));
94};
95
96GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
97} // namespace bigquery_migration_v2_mocks
98} // namespace cloud
99} // namespace google
100
101#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MOCKS_MOCK_MIGRATION_CONNECTION_H
The MigrationServiceConnection object for MigrationServiceClient.
Definition: migration_connection.h:62
A class to mock MigrationServiceConnection.
Definition: mock_migration_connection.h:46
Definition: mock_migration_connection.h:27
Definition: migration_client.h:33
Definition: analytics_hub_client.h:30