Google Cloud IAM C++ Client 2.13.0
A C++ Client Library for Google Cloud IAM
Loading...
Searching...
No Matches
mock_iam_credentials_connection.h
1// Copyright 2020 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/iam/credentials/v1/iamcredentials.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H
21
22#include "google/cloud/iam/credentials/v1/iam_credentials_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 `IAMCredentialsConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `IAMCredentialsClient`. To do so,
35 * construct an object of type `IAMCredentialsClient` 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 */
47 public:
48 MOCK_METHOD(Options, options, (), (override));
49
50 MOCK_METHOD(
51 StatusOr<google::iam::credentials::v1::GenerateAccessTokenResponse>,
52 GenerateAccessToken,
53 (google::iam::credentials::v1::GenerateAccessTokenRequest const& request),
54 (override));
55
56 MOCK_METHOD(
57 StatusOr<google::iam::credentials::v1::GenerateIdTokenResponse>,
58 GenerateIdToken,
59 (google::iam::credentials::v1::GenerateIdTokenRequest const& request),
60 (override));
61
62 MOCK_METHOD(StatusOr<google::iam::credentials::v1::SignBlobResponse>,
63 SignBlob,
64 (google::iam::credentials::v1::SignBlobRequest const& request),
65 (override));
66
67 MOCK_METHOD(StatusOr<google::iam::credentials::v1::SignJwtResponse>, SignJwt,
68 (google::iam::credentials::v1::SignJwtRequest const& request),
69 (override));
70};
71
72GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
73} // namespace iam_credentials_v1_mocks
74} // namespace cloud
75} // namespace google
76
77#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H
The IAMCredentialsConnection object for IAMCredentialsClient.
Definition: iam_credentials_connection.h:60
A class to mock IAMCredentialsConnection.
Definition: mock_iam_credentials_connection.h:46
Definition: mock_iam_credentials_connection.h:27
Definition: iam_credentials_client.h:33