Class MockAckHandler (2.12.0)

The inlined, versioned namespace for the Cloud Pub/Sub C++ client APIs.

Applications may need to link multiple versions of the Cloud Pub/Sub C++ client, for example, if they link a library that uses an older version of the client than they do. This namespace is inlined, so applications can use pubsub::Foo in their source, but the symbols are versioned, i.e., the symbol becomes pubsub::v1::Foo. A googlemock-based mock for pubsub::AckHandler::Impl

See Also

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

Functions

virtual ack()

The implementation for AckHandler::ack()

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

Returns
Type Description
void

virtual nack()

The implementation for AckHandler::nack()

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

Returns
Type Description
void

virtual delivery_attempt() const

The implementation for AckHandler::delivery_attempt()

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

Returns
Type Description
std::int32_t