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_v2_mocks::MockPoliciesConnection Class Reference

A class to mock PoliciesConnection. More...

#include <google/cloud/iam/v2/mocks/mock_policies_connection.h>

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StreamRange< google::iam::v2::Policy >, ListPolicies,(google::iam::v2::ListPoliciesRequest request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v2::Policy >, GetPolicy,(google::iam::v2::GetPolicyRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::iam::v2::Policy > >, CreatePolicy,(google::iam::v2::CreatePolicyRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::iam::v2::Policy > >, UpdatePolicy,(google::iam::v2::UpdatePolicyRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::iam::v2::Policy > >, DeletePolicy,(google::iam::v2::DeletePolicyRequest const &request),(override))
 
virtual Options options ()
 
virtual StreamRange< google::iam::v2::Policy > ListPolicies (google::iam::v2::ListPoliciesRequest request)
 
virtual StatusOr< google::iam::v2::Policy > GetPolicy (google::iam::v2::GetPolicyRequest const &request)
 
virtual future< StatusOr< google::iam::v2::Policy > > CreatePolicy (google::iam::v2::CreatePolicyRequest const &request)
 
virtual future< StatusOr< google::iam::v2::Policy > > UpdatePolicy (google::iam::v2::UpdatePolicyRequest const &request)
 
virtual future< StatusOr< google::iam::v2::Policy > > DeletePolicy (google::iam::v2::DeletePolicyRequest const &request)
 

Detailed Description

A class to mock PoliciesConnection.

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

◆ CreatePolicy()

virtual future< StatusOr< google::iam::v2::Policy > > google::cloud::iam_v2::PoliciesConnection::CreatePolicy ( google::iam::v2::CreatePolicyRequest const &  request)
virtualinherited

◆ DeletePolicy()

virtual future< StatusOr< google::iam::v2::Policy > > google::cloud::iam_v2::PoliciesConnection::DeletePolicy ( google::iam::v2::DeletePolicyRequest const &  request)
virtualinherited

◆ GetPolicy()

virtual StatusOr< google::iam::v2::Policy > google::cloud::iam_v2::PoliciesConnection::GetPolicy ( google::iam::v2::GetPolicyRequest const &  request)
virtualinherited

◆ ListPolicies()

virtual StreamRange< google::iam::v2::Policy > google::cloud::iam_v2::PoliciesConnection::ListPolicies ( google::iam::v2::ListPoliciesRequest  request)
virtualinherited

◆ MOCK_METHOD() [1/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( future< StatusOr< google::iam::v2::Policy > >  ,
CreatePolicy  ,
(google::iam::v2::CreatePolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [2/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( future< StatusOr< google::iam::v2::Policy > >  ,
DeletePolicy  ,
(google::iam::v2::DeletePolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( future< StatusOr< google::iam::v2::Policy > >  ,
UpdatePolicy  ,
(google::iam::v2::UpdatePolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [4/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [5/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( StatusOr< google::iam::v2::Policy >  ,
GetPolicy  ,
(google::iam::v2::GetPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [6/6]

google::cloud::iam_v2_mocks::MockPoliciesConnection::MOCK_METHOD ( StreamRange< google::iam::v2::Policy >  ,
ListPolicies  ,
(google::iam::v2::ListPoliciesRequest request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::iam_v2::PoliciesConnection::options ( )
inlinevirtualinherited

◆ UpdatePolicy()

virtual future< StatusOr< google::iam::v2::Policy > > google::cloud::iam_v2::PoliciesConnection::UpdatePolicy ( google::iam::v2::UpdatePolicyRequest const &  request)
virtualinherited