Send feedback
Class MockLivestreamServiceConnection (2.33.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.33.0 keyboard_arrow_down
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-17 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["This webpage provides documentation for the `MockLivestreamServiceConnection` class, which is designed to simulate responses and errors for testing applications that interact with `LivestreamServiceClient`."],["The class utilizes Google Test's gMock framework, and its functions are implemented using `MOCK_METHOD()`, allowing developers to program the mock's behavior in their tests."],["The page details various functions, like `CreateChannel`, `ListChannels`, `GetChannel`, and many more, outlining their parameters and return types to allow for effective mocking of common tasks."],["There are links to different versions of the documentation, from version `2.11.0` to `2.37.0-rc` (the latest), allowing users to access information specific to their project's version."],["The webpage also provides a link to an example, showcasing how to use GoogleTest with BigQuery's types, with the underlying principles being applicable to any `*Client` and `*Connection` pair."]]],[]]