Class MockLivestreamServiceConnection (2.31.0-rc)

A class to mock LivestreamServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type LivestreamServiceClient. To do so, construct an object of type LivestreamServiceClient 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 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::video::livestream::v1::Channel > >

virtual ListChannels(google::cloud::video::livestream::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::video::livestream::v1::ListChannelsRequest
Returns
Type Description
StreamRange< google::cloud::video::livestream::v1::Channel >

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

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::video::livestream::v1::Channel > >

virtual StartChannel(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::video::livestream::v1::ChannelOperationResponse > >

virtual StopChannel(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::video::livestream::v1::ChannelOperationResponse > >

virtual CreateInput(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::video::livestream::v1::Input > >

virtual ListInputs(google::cloud::video::livestream::v1::ListInputsRequest)

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::video::livestream::v1::ListInputsRequest
Returns
Type Description
StreamRange< google::cloud::video::livestream::v1::Input >

virtual GetInput(google::cloud::video::livestream::v1::GetInputRequest 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::video::livestream::v1::GetInputRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Input >

virtual DeleteInput(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::video::livestream::v1::OperationMetadata > >

virtual UpdateInput(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::video::livestream::v1::Input > >

virtual CreateEvent(google::cloud::video::livestream::v1::CreateEventRequest 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::video::livestream::v1::CreateEventRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Event >

virtual ListEvents(google::cloud::video::livestream::v1::ListEventsRequest)

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::video::livestream::v1::ListEventsRequest
Returns
Type Description
StreamRange< google::cloud::video::livestream::v1::Event >

virtual GetEvent(google::cloud::video::livestream::v1::GetEventRequest 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::video::livestream::v1::GetEventRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Event >

virtual DeleteEvent(google::cloud::video::livestream::v1::DeleteEventRequest 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::video::livestream::v1::DeleteEventRequest const &
Returns
Type Description
Status

virtual ListClips(google::cloud::video::livestream::v1::ListClipsRequest)

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::video::livestream::v1::ListClipsRequest
Returns
Type Description
StreamRange< google::cloud::video::livestream::v1::Clip >

virtual GetClip(google::cloud::video::livestream::v1::GetClipRequest 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::video::livestream::v1::GetClipRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Clip >

virtual CreateClip(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::video::livestream::v1::Clip > >

virtual DeleteClip(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::video::livestream::v1::OperationMetadata > >

virtual CreateAsset(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::video::livestream::v1::Asset > >

virtual DeleteAsset(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::video::livestream::v1::OperationMetadata > >

virtual GetAsset(google::cloud::video::livestream::v1::GetAssetRequest 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::video::livestream::v1::GetAssetRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Asset >

virtual ListAssets(google::cloud::video::livestream::v1::ListAssetsRequest)

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::video::livestream::v1::ListAssetsRequest
Returns
Type Description
StreamRange< google::cloud::video::livestream::v1::Asset >

virtual GetPool(google::cloud::video::livestream::v1::GetPoolRequest 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::video::livestream::v1::GetPoolRequest const &
Returns
Type Description
StatusOr< google::cloud::video::livestream::v1::Pool >

virtual UpdatePool(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::video::livestream::v1::Pool > >

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