Class MockSubscriberConnection (2.12.0)

A googlemock-based mock for pubsub::SubscriberConnection.

Functions

virtual Subscribe(SubscribeParams)

Defines the interface for Subscriber::Subscribe(ApplicationCallback)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
p SubscribeParams
Returns
Type Description
future< Status >

virtual ExactlyOnceSubscribe(ExactlyOnceSubscribeParams)

Defines the interface for Subscriber::Subscribe(ExactlyOnceApplicationCallback).

We use a different name for this function (as opposed to an overload) to simplify the use of mocks.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
p ExactlyOnceSubscribeParams
Returns
Type Description
future< Status >

virtual options()

Returns the configuration parameters for this object.

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 Pull()

Returns
Type Description
StatusOr< PullResponse >