Class MockNetworkServicesConnection (2.16.0)

A class to mock NetworkServicesConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type NetworkServicesClient. To do so, construct an object of type NetworkServicesClient 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 ListEndpointPolicies(google::cloud::networkservices::v1::ListEndpointPoliciesRequest)

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::networkservices::v1::ListEndpointPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::EndpointPolicy >

virtual GetEndpointPolicy(google::cloud::networkservices::v1::GetEndpointPolicyRequest 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::networkservices::v1::GetEndpointPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::EndpointPolicy >

virtual CreateEndpointPolicy(google::cloud::networkservices::v1::CreateEndpointPolicyRequest 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::networkservices::v1::CreateEndpointPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::EndpointPolicy > >

virtual UpdateEndpointPolicy(google::cloud::networkservices::v1::UpdateEndpointPolicyRequest 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::networkservices::v1::UpdateEndpointPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::EndpointPolicy > >

virtual DeleteEndpointPolicy(google::cloud::networkservices::v1::DeleteEndpointPolicyRequest 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::networkservices::v1::DeleteEndpointPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListGateways(google::cloud::networkservices::v1::ListGatewaysRequest)

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::networkservices::v1::ListGatewaysRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::Gateway >

virtual GetGateway(google::cloud::networkservices::v1::GetGatewayRequest 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::networkservices::v1::GetGatewayRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::Gateway >

virtual CreateGateway(google::cloud::networkservices::v1::CreateGatewayRequest 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::networkservices::v1::CreateGatewayRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::Gateway > >

virtual UpdateGateway(google::cloud::networkservices::v1::UpdateGatewayRequest 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::networkservices::v1::UpdateGatewayRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::Gateway > >

virtual DeleteGateway(google::cloud::networkservices::v1::DeleteGatewayRequest 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::networkservices::v1::DeleteGatewayRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListGrpcRoutes(google::cloud::networkservices::v1::ListGrpcRoutesRequest)

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::networkservices::v1::ListGrpcRoutesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::GrpcRoute >

virtual GetGrpcRoute(google::cloud::networkservices::v1::GetGrpcRouteRequest 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::networkservices::v1::GetGrpcRouteRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::GrpcRoute >

virtual CreateGrpcRoute(google::cloud::networkservices::v1::CreateGrpcRouteRequest 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::networkservices::v1::CreateGrpcRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::GrpcRoute > >

virtual UpdateGrpcRoute(google::cloud::networkservices::v1::UpdateGrpcRouteRequest 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::networkservices::v1::UpdateGrpcRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::GrpcRoute > >

virtual DeleteGrpcRoute(google::cloud::networkservices::v1::DeleteGrpcRouteRequest 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::networkservices::v1::DeleteGrpcRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListHttpRoutes(google::cloud::networkservices::v1::ListHttpRoutesRequest)

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::networkservices::v1::ListHttpRoutesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::HttpRoute >

virtual GetHttpRoute(google::cloud::networkservices::v1::GetHttpRouteRequest 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::networkservices::v1::GetHttpRouteRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::HttpRoute >

virtual CreateHttpRoute(google::cloud::networkservices::v1::CreateHttpRouteRequest 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::networkservices::v1::CreateHttpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::HttpRoute > >

virtual UpdateHttpRoute(google::cloud::networkservices::v1::UpdateHttpRouteRequest 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::networkservices::v1::UpdateHttpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::HttpRoute > >

virtual DeleteHttpRoute(google::cloud::networkservices::v1::DeleteHttpRouteRequest 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::networkservices::v1::DeleteHttpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListTcpRoutes(google::cloud::networkservices::v1::ListTcpRoutesRequest)

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::networkservices::v1::ListTcpRoutesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::TcpRoute >

virtual GetTcpRoute(google::cloud::networkservices::v1::GetTcpRouteRequest 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::networkservices::v1::GetTcpRouteRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::TcpRoute >

virtual CreateTcpRoute(google::cloud::networkservices::v1::CreateTcpRouteRequest 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::networkservices::v1::CreateTcpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::TcpRoute > >

virtual UpdateTcpRoute(google::cloud::networkservices::v1::UpdateTcpRouteRequest 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::networkservices::v1::UpdateTcpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::TcpRoute > >

virtual DeleteTcpRoute(google::cloud::networkservices::v1::DeleteTcpRouteRequest 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::networkservices::v1::DeleteTcpRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListTlsRoutes(google::cloud::networkservices::v1::ListTlsRoutesRequest)

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::networkservices::v1::ListTlsRoutesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::TlsRoute >

virtual GetTlsRoute(google::cloud::networkservices::v1::GetTlsRouteRequest 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::networkservices::v1::GetTlsRouteRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::TlsRoute >

virtual CreateTlsRoute(google::cloud::networkservices::v1::CreateTlsRouteRequest 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::networkservices::v1::CreateTlsRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::TlsRoute > >

virtual UpdateTlsRoute(google::cloud::networkservices::v1::UpdateTlsRouteRequest 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::networkservices::v1::UpdateTlsRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::TlsRoute > >

virtual DeleteTlsRoute(google::cloud::networkservices::v1::DeleteTlsRouteRequest 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::networkservices::v1::DeleteTlsRouteRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListServiceBindings(google::cloud::networkservices::v1::ListServiceBindingsRequest)

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::networkservices::v1::ListServiceBindingsRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::ServiceBinding >

virtual GetServiceBinding(google::cloud::networkservices::v1::GetServiceBindingRequest 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::networkservices::v1::GetServiceBindingRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::ServiceBinding >

virtual CreateServiceBinding(google::cloud::networkservices::v1::CreateServiceBindingRequest 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::networkservices::v1::CreateServiceBindingRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::ServiceBinding > >

virtual DeleteServiceBinding(google::cloud::networkservices::v1::DeleteServiceBindingRequest 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::networkservices::v1::DeleteServiceBindingRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >

virtual ListMeshes(google::cloud::networkservices::v1::ListMeshesRequest)

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::networkservices::v1::ListMeshesRequest
Returns
Type Description
StreamRange< google::cloud::networkservices::v1::Mesh >

virtual GetMesh(google::cloud::networkservices::v1::GetMeshRequest 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::networkservices::v1::GetMeshRequest const &
Returns
Type Description
StatusOr< google::cloud::networkservices::v1::Mesh >

virtual CreateMesh(google::cloud::networkservices::v1::CreateMeshRequest 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::networkservices::v1::CreateMeshRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::Mesh > >

virtual UpdateMesh(google::cloud::networkservices::v1::UpdateMeshRequest 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::networkservices::v1::UpdateMeshRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::Mesh > >

virtual DeleteMesh(google::cloud::networkservices::v1::DeleteMeshRequest 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::networkservices::v1::DeleteMeshRequest const &
Returns
Type Description
future< StatusOr< google::cloud::networkservices::v1::OperationMetadata > >