Class MockPublisherConnection (2.21.0)

A googlemock-based mock for pubsub::PublisherConnection.

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 Publisher::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
future< StatusOr< std::string > >

virtual Flush(FlushParams)

Defines the interface for Publisher::Flush()

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

Parameter
NameDescription
FlushParams
Returns
TypeDescription
void

virtual ResumePublish(ResumePublishParams)

Defines the interface for Publisher::ResumePublish()

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

Parameter
NameDescription
p ResumePublishParams
Returns
TypeDescription
void