Class MockPrivilegedAccessManagerConnection (2.31.0-rc)

A class to mock PrivilegedAccessManagerConnection.

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

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
Type Description
Options

virtual CheckOnboardingStatus(google::cloud::privilegedaccessmanager::v1::CheckOnboardingStatusRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::CheckOnboardingStatusRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::CheckOnboardingStatusResponse >

virtual ListEntitlements(google::cloud::privilegedaccessmanager::v1::ListEntitlementsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::ListEntitlementsRequest
Returns
Type Description
StreamRange< google::cloud::privilegedaccessmanager::v1::Entitlement >

virtual SearchEntitlements(google::cloud::privilegedaccessmanager::v1::SearchEntitlementsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::SearchEntitlementsRequest
Returns
Type Description
StreamRange< google::cloud::privilegedaccessmanager::v1::Entitlement >

virtual GetEntitlement(google::cloud::privilegedaccessmanager::v1::GetEntitlementRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::GetEntitlementRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::Entitlement >

virtual CreateEntitlement(google::longrunning::Operation const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::privilegedaccessmanager::v1::Entitlement > >

virtual DeleteEntitlement(google::longrunning::Operation const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::privilegedaccessmanager::v1::Entitlement > >

virtual UpdateEntitlement(google::longrunning::Operation const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::privilegedaccessmanager::v1::Entitlement > >

virtual ListGrants(google::cloud::privilegedaccessmanager::v1::ListGrantsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::ListGrantsRequest
Returns
Type Description
StreamRange< google::cloud::privilegedaccessmanager::v1::Grant >

virtual SearchGrants(google::cloud::privilegedaccessmanager::v1::SearchGrantsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::SearchGrantsRequest
Returns
Type Description
StreamRange< google::cloud::privilegedaccessmanager::v1::Grant >

virtual GetGrant(google::cloud::privilegedaccessmanager::v1::GetGrantRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::GetGrantRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::Grant >

virtual CreateGrant(google::cloud::privilegedaccessmanager::v1::CreateGrantRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::CreateGrantRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::Grant >

virtual ApproveGrant(google::cloud::privilegedaccessmanager::v1::ApproveGrantRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::ApproveGrantRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::Grant >

virtual DenyGrant(google::cloud::privilegedaccessmanager::v1::DenyGrantRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::privilegedaccessmanager::v1::DenyGrantRequest const &
Returns
Type Description
StatusOr< google::cloud::privilegedaccessmanager::v1::Grant >

virtual RevokeGrant(google::longrunning::Operation const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::privilegedaccessmanager::v1::Grant > >

virtual ListLocations(google::cloud::location::ListLocationsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::location::ListLocationsRequest
Returns
Type Description
StreamRange< google::cloud::location::Location >

virtual GetLocation(google::cloud::location::GetLocationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::cloud::location::GetLocationRequest const &
Returns
Type Description
StatusOr< google::cloud::location::Location >

virtual ListOperations(google::longrunning::ListOperationsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::longrunning::ListOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual GetOperation(google::longrunning::GetOperationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteOperation(google::longrunning::DeleteOperationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::longrunning::DeleteOperationRequest const &
Returns
Type Description
Status