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_v1_mocks::MockIAMPolicyConnection Class Reference

A class to mock IAMPolicyConnection. More...

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

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, SetIamPolicy,(google::iam::v1::SetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, GetIamPolicy,(google::iam::v1::GetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::TestIamPermissionsResponse >, TestIamPermissions,(google::iam::v1::TestIamPermissionsRequest const &request),(override))
 
virtual Options options ()
 
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy (google::iam::v1::SetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy (google::iam::v1::GetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions (google::iam::v1::TestIamPermissionsRequest const &request)
 

Detailed Description

A class to mock IAMPolicyConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type IAMPolicyClient. To do so, construct an object of type IAMPolicyClient 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

◆ GetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::iam_v1::IAMPolicyConnection::GetIamPolicy ( google::iam::v1::GetIamPolicyRequest const &  request)
virtualinherited

◆ MOCK_METHOD() [1/4]

google::cloud::iam_v1_mocks::MockIAMPolicyConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [2/4]

google::cloud::iam_v1_mocks::MockIAMPolicyConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
GetIamPolicy  ,
(google::iam::v1::GetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/4]

google::cloud::iam_v1_mocks::MockIAMPolicyConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
SetIamPolicy  ,
(google::iam::v1::SetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [4/4]

google::cloud::iam_v1_mocks::MockIAMPolicyConnection::MOCK_METHOD ( StatusOr< google::iam::v1::TestIamPermissionsResponse >  ,
TestIamPermissions  ,
(google::iam::v1::TestIamPermissionsRequest const &request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::iam_v1::IAMPolicyConnection::options ( )
inlinevirtualinherited

◆ SetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::iam_v1::IAMPolicyConnection::SetIamPolicy ( google::iam::v1::SetIamPolicyRequest const &  request)
virtualinherited

◆ TestIamPermissions()

virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > google::cloud::iam_v1::IAMPolicyConnection::TestIamPermissions ( google::iam::v1::TestIamPermissionsRequest const &  request)
virtualinherited