Send feedback
Class MockPrivilegedAccessManagerConnection (2.29.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.29.0 keyboard_arrow_down
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 > >
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[]]