Class MockBlockingPublisherConnection (2.11.0)

A googlemock-based mock for pubsub::BlockingPublisherConnection.

See Also

Testing your Cloud Pub/Sub publisher application with googlemock for an example using this class.

Functions

virtual Publish(PublishParams)

Defines the interface for BlockingPublisher::Publish()

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

Parameter
Name Description
p PublishParams
Returns
Type Description
StatusOr< std::string >

virtual options()

Returns the options configured at initialization time.

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

Returns
Type Description
Options