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::cloud::eventarc::v1::CreateTriggerRequest 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::CreateTriggerRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::eventarc::v1::Trigger > > |
|
virtual UpdateTrigger(google::cloud::eventarc::v1::UpdateTriggerRequest 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::UpdateTriggerRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::eventarc::v1::Trigger > > |
|
virtual DeleteTrigger(google::cloud::eventarc::v1::DeleteTriggerRequest 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::DeleteTriggerRequest 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::cloud::eventarc::v1::CreateChannelRequest 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::CreateChannelRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::eventarc::v1::Channel > > |
|
virtual UpdateChannel(google::cloud::eventarc::v1::UpdateChannelRequest 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::UpdateChannelRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::eventarc::v1::Channel > > |
|
virtual DeleteChannel(google::cloud::eventarc::v1::DeleteChannelRequest 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::DeleteChannelRequest 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::cloud::eventarc::v1::CreateChannelConnectionRequest 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::CreateChannelConnectionRequest const &
|
Returns |
Type |
Description |
future< StatusOr< google::cloud::eventarc::v1::ChannelConnection > > |
|
virtual DeleteChannelConnection(google::cloud::eventarc::v1::DeleteChannelConnectionRequest 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::DeleteChannelConnectionRequest 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 > |
|