Class MockBlockingPublisherConnection (2.22.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
NameDescription
p PublishParams
Returns
TypeDescription
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
TypeDescription
Options