Class MockEventarcConnection (2.32.0)

A class to mock EventarcConnection.

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

virtual ListTriggers(google::cloud::eventarc::v1::ListTriggersRequest)

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::eventarc::v1::ListTriggersRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::Trigger >

virtual CreateTrigger(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::eventarc::v1::Trigger > >

virtual UpdateTrigger(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::eventarc::v1::Trigger > >

virtual DeleteTrigger(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::eventarc::v1::Trigger > >

virtual GetChannel(google::cloud::eventarc::v1::GetChannelRequest 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::eventarc::v1::GetChannelRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::Channel >

virtual ListChannels(google::cloud::eventarc::v1::ListChannelsRequest)

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::eventarc::v1::ListChannelsRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::Channel >

virtual CreateChannel(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::eventarc::v1::Channel > >

virtual UpdateChannel(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::eventarc::v1::Channel > >

virtual DeleteChannel(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::eventarc::v1::Channel > >

virtual GetProvider(google::cloud::eventarc::v1::GetProviderRequest 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::eventarc::v1::GetProviderRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::Provider >

virtual ListProviders(google::cloud::eventarc::v1::ListProvidersRequest)

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::eventarc::v1::ListProvidersRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::Provider >

virtual GetChannelConnection(google::cloud::eventarc::v1::GetChannelConnectionRequest 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::eventarc::v1::GetChannelConnectionRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::ChannelConnection >

virtual ListChannelConnections(google::cloud::eventarc::v1::ListChannelConnectionsRequest)

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::eventarc::v1::ListChannelConnectionsRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::ChannelConnection >

virtual CreateChannelConnection(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::eventarc::v1::ChannelConnection > >

virtual DeleteChannelConnection(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::eventarc::v1::ChannelConnection > >

virtual GetGoogleChannelConfig(google::cloud::eventarc::v1::GetGoogleChannelConfigRequest 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::eventarc::v1::GetGoogleChannelConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::GoogleChannelConfig >

virtual UpdateGoogleChannelConfig(google::cloud::eventarc::v1::UpdateGoogleChannelConfigRequest 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::eventarc::v1::UpdateGoogleChannelConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::GoogleChannelConfig >

virtual GetMessageBus(google::cloud::eventarc::v1::GetMessageBusRequest 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::eventarc::v1::GetMessageBusRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::MessageBus >

virtual ListMessageBuses(google::cloud::eventarc::v1::ListMessageBusesRequest)

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::eventarc::v1::ListMessageBusesRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::MessageBus >

virtual ListMessageBusEnrollments(google::cloud::eventarc::v1::ListMessageBusEnrollmentsRequest 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::eventarc::v1::ListMessageBusEnrollmentsRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::ListMessageBusEnrollmentsResponse >

virtual CreateMessageBus(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::eventarc::v1::MessageBus > >

virtual UpdateMessageBus(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::eventarc::v1::MessageBus > >

virtual DeleteMessageBus(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::eventarc::v1::MessageBus > >

virtual GetEnrollment(google::cloud::eventarc::v1::GetEnrollmentRequest 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::eventarc::v1::GetEnrollmentRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::Enrollment >

virtual ListEnrollments(google::cloud::eventarc::v1::ListEnrollmentsRequest)

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::eventarc::v1::ListEnrollmentsRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::Enrollment >

virtual CreateEnrollment(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::eventarc::v1::Enrollment > >

virtual UpdateEnrollment(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::eventarc::v1::Enrollment > >

virtual DeleteEnrollment(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::eventarc::v1::Enrollment > >

virtual GetPipeline(google::cloud::eventarc::v1::GetPipelineRequest 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::eventarc::v1::GetPipelineRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::Pipeline >

virtual ListPipelines(google::cloud::eventarc::v1::ListPipelinesRequest)

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::eventarc::v1::ListPipelinesRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::Pipeline >

virtual CreatePipeline(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::eventarc::v1::Pipeline > >

virtual UpdatePipeline(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::eventarc::v1::Pipeline > >

virtual DeletePipeline(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::eventarc::v1::Pipeline > >

virtual GetGoogleApiSource(google::cloud::eventarc::v1::GetGoogleApiSourceRequest 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::eventarc::v1::GetGoogleApiSourceRequest const &
Returns
Type Description
StatusOr< google::cloud::eventarc::v1::GoogleApiSource >

virtual ListGoogleApiSources(google::cloud::eventarc::v1::ListGoogleApiSourcesRequest)

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::eventarc::v1::ListGoogleApiSourcesRequest
Returns
Type Description
StreamRange< google::cloud::eventarc::v1::GoogleApiSource >

virtual CreateGoogleApiSource(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::eventarc::v1::GoogleApiSource > >

virtual UpdateGoogleApiSource(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::eventarc::v1::GoogleApiSource > >

virtual DeleteGoogleApiSource(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::eventarc::v1::GoogleApiSource > >

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 >

virtual ListOperations(google::longrunning::ListOperationsRequest)

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::longrunning::ListOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteOperation(google::longrunning::DeleteOperationRequest 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::longrunning::DeleteOperationRequest const &
Returns
Type Description
Status

virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
Returns
Type Description
Status