Send feedback
Class MockAuthProviderServiceConnection (3.8.0)
Stay organized with collections
Save and categorize content based on your preferences.
3.8.0 (latest)
3.8.0-rc
A class to mock AuthProviderServiceConnection.
Application developers may want to test their code with simulated responses, including errors, from an object of type AuthProviderServiceClient. To do so, construct an object of type AuthProviderServiceClient 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 ListAuthProviders(google::cloud::agentidentity::v1::ListAuthProvidersRequest)
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::agentidentity::v1::ListAuthProvidersRequest
Returns
Type
Description
StreamRange< google::cloud::agentidentity::v1::AuthProvider >
virtual GetAuthProvider(google::cloud::agentidentity::v1::GetAuthProviderRequest 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::agentidentity::v1::GetAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
virtual CreateAuthProvider(google::cloud::agentidentity::v1::CreateAuthProviderRequest 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::agentidentity::v1::CreateAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
virtual UpdateAuthProvider(google::cloud::agentidentity::v1::UpdateAuthProviderRequest 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::agentidentity::v1::UpdateAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
virtual DeleteAuthProvider(google::cloud::agentidentity::v1::DeleteAuthProviderRequest 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::agentidentity::v1::DeleteAuthProviderRequest const &
Returns
Type
Description
Status
virtual UndeleteAuthProvider(google::cloud::agentidentity::v1::UndeleteAuthProviderRequest 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::agentidentity::v1::UndeleteAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
virtual QueryAuthProviders(google::cloud::agentidentity::v1::QueryAuthProvidersRequest)
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::agentidentity::v1::QueryAuthProvidersRequest
Returns
Type
Description
StreamRange< std::string >
virtual QueryWorkloads(google::cloud::agentidentity::v1::QueryWorkloadsRequest)
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::agentidentity::v1::QueryWorkloadsRequest
Returns
Type
Description
StreamRange< std::string >
virtual ListAuthorizations(google::cloud::agentidentity::v1::ListAuthorizationsRequest)
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::agentidentity::v1::ListAuthorizationsRequest
Returns
Type
Description
StreamRange< google::cloud::agentidentity::v1::Authorization >
virtual GetAuthorization(google::cloud::agentidentity::v1::GetAuthorizationRequest 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::agentidentity::v1::GetAuthorizationRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::Authorization >
virtual DeleteAuthorization(google::cloud::agentidentity::v1::DeleteAuthorizationRequest 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::agentidentity::v1::DeleteAuthorizationRequest const &
Returns
Type
Description
Status
virtual ListAccessSummaries(google::cloud::agentidentity::v1::ListAccessSummariesRequest)
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::agentidentity::v1::ListAccessSummariesRequest
Returns
Type
Description
StreamRange< google::cloud::agentidentity::v1::AccessSummary >
virtual GetAccessSummary(google::cloud::agentidentity::v1::GetAccessSummaryRequest 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::agentidentity::v1::GetAccessSummaryRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AccessSummary >
virtual RevokeAuthorization(google::cloud::agentidentity::v1::RevokeAuthorizationRequest 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::agentidentity::v1::RevokeAuthorizationRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::RevokeAuthorizationResponse >
virtual EnableAuthProvider(google::cloud::agentidentity::v1::EnableAuthProviderRequest 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::agentidentity::v1::EnableAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
virtual DisableAuthProvider(google::cloud::agentidentity::v1::DisableAuthProviderRequest 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::agentidentity::v1::DisableAuthProviderRequest const &
Returns
Type
Description
StatusOr< google::cloud::agentidentity::v1::AuthProvider >
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 SetIamPolicy(google::iam::v1::SetIamPolicyRequest 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::iam::v1::SetIamPolicyRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::Policy >
virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest 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::iam::v1::GetIamPolicyRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::Policy >
virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest 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::iam::v1::TestIamPermissionsRequest const &
Returns
Type
Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >
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 2026-08-06 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 2026-08-06 UTC."],[],[]]