Google Cloud IAM C++ Client 2.13.0
A C++ Client Library for Google Cloud IAM
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection Class Reference

A class to mock IAMCredentialsConnection. More...

#include <google/cloud/iam/credentials/v1/mocks/mock_iam_credentials_connection.h>

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StatusOr< google::iam::credentials::v1::GenerateAccessTokenResponse >, GenerateAccessToken,(google::iam::credentials::v1::GenerateAccessTokenRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::credentials::v1::GenerateIdTokenResponse >, GenerateIdToken,(google::iam::credentials::v1::GenerateIdTokenRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::credentials::v1::SignBlobResponse >, SignBlob,(google::iam::credentials::v1::SignBlobRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::credentials::v1::SignJwtResponse >, SignJwt,(google::iam::credentials::v1::SignJwtRequest const &request),(override))
 
virtual Options options ()
 
virtual StatusOr< google::iam::credentials::v1::GenerateAccessTokenResponse > GenerateAccessToken (google::iam::credentials::v1::GenerateAccessTokenRequest const &request)
 
virtual StatusOr< google::iam::credentials::v1::GenerateIdTokenResponse > GenerateIdToken (google::iam::credentials::v1::GenerateIdTokenRequest const &request)
 
virtual StatusOr< google::iam::credentials::v1::SignBlobResponse > SignBlob (google::iam::credentials::v1::SignBlobRequest const &request)
 
virtual StatusOr< google::iam::credentials::v1::SignJwtResponse > SignJwt (google::iam::credentials::v1::SignJwtRequest const &request)
 

Detailed Description

A class to mock IAMCredentialsConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type IAMCredentialsClient. To do so, construct an object of type IAMCredentialsClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See also
This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Member Function Documentation

◆ GenerateAccessToken()

virtual StatusOr< google::iam::credentials::v1::GenerateAccessTokenResponse > google::cloud::iam_credentials_v1::IAMCredentialsConnection::GenerateAccessToken ( google::iam::credentials::v1::GenerateAccessTokenRequest const &  request)
virtualinherited

◆ GenerateIdToken()

virtual StatusOr< google::iam::credentials::v1::GenerateIdTokenResponse > google::cloud::iam_credentials_v1::IAMCredentialsConnection::GenerateIdToken ( google::iam::credentials::v1::GenerateIdTokenRequest const &  request)
virtualinherited

◆ MOCK_METHOD() [1/5]

google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [2/5]

google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection::MOCK_METHOD ( StatusOr< google::iam::credentials::v1::GenerateAccessTokenResponse >  ,
GenerateAccessToken  ,
(google::iam::credentials::v1::GenerateAccessTokenRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/5]

google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection::MOCK_METHOD ( StatusOr< google::iam::credentials::v1::GenerateIdTokenResponse >  ,
GenerateIdToken  ,
(google::iam::credentials::v1::GenerateIdTokenRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [4/5]

google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection::MOCK_METHOD ( StatusOr< google::iam::credentials::v1::SignBlobResponse >  ,
SignBlob  ,
(google::iam::credentials::v1::SignBlobRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [5/5]

google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection::MOCK_METHOD ( StatusOr< google::iam::credentials::v1::SignJwtResponse >  ,
SignJwt  ,
(google::iam::credentials::v1::SignJwtRequest const &request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::iam_credentials_v1::IAMCredentialsConnection::options ( )
inlinevirtualinherited

◆ SignBlob()

virtual StatusOr< google::iam::credentials::v1::SignBlobResponse > google::cloud::iam_credentials_v1::IAMCredentialsConnection::SignBlob ( google::iam::credentials::v1::SignBlobRequest const &  request)
virtualinherited

◆ SignJwt()

virtual StatusOr< google::iam::credentials::v1::SignJwtResponse > google::cloud::iam_credentials_v1::IAMCredentialsConnection::SignJwt ( google::iam::credentials::v1::SignJwtRequest const &  request)
virtualinherited