Class MockRegistrationServiceConnection (2.14.0)

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
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::CreateNamespaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::ListNamespacesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::GetNamespaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::UpdateNamespaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::DeleteNamespaceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::CreateServiceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::ListServicesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::GetServiceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::UpdateServiceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::DeleteServiceRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::CreateEndpointRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::ListEndpointsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::GetEndpointRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::UpdateEndpointRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::servicedirectory::v1::DeleteEndpointRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::GetIamPolicyRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::SetIamPolicyRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::TestIamPermissionsRequest const &
Returns
TypeDescription
StatusOr< google::iam::v1::TestIamPermissionsResponse >