Google Cloud BigQuery C++ Client
2.13.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
v2
minimal
mocks
mock_project_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
#
ifndef
GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_MOCKS_MOCK_PROJECT_CONNECTION_H
16
#
define
GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_MOCKS_MOCK_PROJECT_CONNECTION_H
17
18
#
include
"google/cloud/bigquery/v2/minimal/internal/project_connection.h"
19
#
include
<
gmock
/
gmock
.
h
>
20
21
namespace
google
{
22
namespace
cloud
{
23
namespace
bigquery_v2_minimal_internal
{
24
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
25
26
/*
27
* A class to mock `ProjectConnection`.
28
*
29
* Application developers may want to test their code with simulated responses,
30
* including errors, from an object of type `ProjectClient`. To do so,
31
* construct an object of type `ProjectClient` with an instance of this
32
* class. Then use the Google Test framework functions to program the behavior
33
* of this mock.
34
*/
35
// TODO(#11039): Move to "bigquery_v2_minimal_mocks" namespace when api is ready
36
// to go public.
37
class
MockProjectConnection
:
public
ProjectConnection {
38
public
:
39
MOCK_METHOD(
Options
, options, (), (
override
));
40
41
MOCK_METHOD(StreamRange<Project>, ListProjects,
42
(ListProjectsRequest
const
& request), (
override
));
43
};
44
45
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
46
}
// namespace bigquery_v2_minimal_internal
47
}
// namespace cloud
48
}
// namespace google
49
50
#
endif
// GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_MOCKS_MOCK_PROJECT_CONNECTION_H
google::cloud::Options
google::cloud::bigquery_v2_minimal_internal::MockProjectConnection
Definition:
mock_project_connection.h:37
google::cloud::bigquery_v2_minimal_internal
Definition:
mock_dataset_connection.h:23
google::cloud
google
Generated on Mon Jul 3 2023 20:47:14 for Google Cloud BigQuery C++ Client by
1.9.5