Class MockRegistrationServiceConnection (2.32.0-rc)

A class to mock RegistrationServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type RegistrationServiceClient. To do so, construct an object of type RegistrationServiceClient 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 CreateNamespace(google::cloud::servicedirectory::v1::CreateNamespaceRequest 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::servicedirectory::v1::CreateNamespaceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Namespace >

virtual ListNamespaces(google::cloud::servicedirectory::v1::ListNamespacesRequest)

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::servicedirectory::v1::ListNamespacesRequest
Returns
Type Description
StreamRange< google::cloud::servicedirectory::v1::Namespace >

virtual GetNamespace(google::cloud::servicedirectory::v1::GetNamespaceRequest 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::servicedirectory::v1::GetNamespaceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Namespace >

virtual UpdateNamespace(google::cloud::servicedirectory::v1::UpdateNamespaceRequest 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::servicedirectory::v1::UpdateNamespaceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Namespace >

virtual DeleteNamespace(google::cloud::servicedirectory::v1::DeleteNamespaceRequest 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::servicedirectory::v1::DeleteNamespaceRequest const &
Returns
Type Description
Status

virtual CreateService(google::cloud::servicedirectory::v1::CreateServiceRequest 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::servicedirectory::v1::CreateServiceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Service >

virtual ListServices(google::cloud::servicedirectory::v1::ListServicesRequest)

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::servicedirectory::v1::ListServicesRequest
Returns
Type Description
StreamRange< google::cloud::servicedirectory::v1::Service >

virtual GetService(google::cloud::servicedirectory::v1::GetServiceRequest 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::servicedirectory::v1::GetServiceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Service >

virtual UpdateService(google::cloud::servicedirectory::v1::UpdateServiceRequest 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::servicedirectory::v1::UpdateServiceRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Service >

virtual DeleteService(google::cloud::servicedirectory::v1::DeleteServiceRequest 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::servicedirectory::v1::DeleteServiceRequest const &
Returns
Type Description
Status

virtual CreateEndpoint(google::cloud::servicedirectory::v1::CreateEndpointRequest 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::servicedirectory::v1::CreateEndpointRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Endpoint >

virtual ListEndpoints(google::cloud::servicedirectory::v1::ListEndpointsRequest)

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::servicedirectory::v1::ListEndpointsRequest
Returns
Type Description
StreamRange< google::cloud::servicedirectory::v1::Endpoint >

virtual GetEndpoint(google::cloud::servicedirectory::v1::GetEndpointRequest 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::servicedirectory::v1::GetEndpointRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Endpoint >

virtual UpdateEndpoint(google::cloud::servicedirectory::v1::UpdateEndpointRequest 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::servicedirectory::v1::UpdateEndpointRequest const &
Returns
Type Description
StatusOr< google::cloud::servicedirectory::v1::Endpoint >

virtual DeleteEndpoint(google::cloud::servicedirectory::v1::DeleteEndpointRequest 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::servicedirectory::v1::DeleteEndpointRequest const &
Returns
Type Description
Status

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 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 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 >

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 >