Class MockExactlyOnceAckHandler (2.23.0-rc)

A googlemock-based mock for [pubsub::ExactlyOnceAckHandler::Impl][mocked-link].

google:☁️:pubsub_internal::ExactlyOnceAckHandler::Impl

See Also

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

Functions

virtual ack()

The implementation for ExactlyOnceAckHandler::ack()

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

Returns
TypeDescription
future< Status >

virtual nack()

The implementation for ExactlyOnceAckHandler::nack()

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

Returns
TypeDescription
future< Status >

virtual ack_id()

Returns the ack id for the handler.

There is no corresponding public interface to access the ack id in ExactlyOnceAckHandler. This is for internal use only.

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

Returns
TypeDescription
std::string

virtual delivery_attempt() const

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

Returns
TypeDescription
std::int32_t

virtual subscription() const

Returns the subscription for the handler.

There is no corresponding public interface to access the subscription id in ExactlyOnceAckHandler. This is for internal use only.

Returns
TypeDescription
pubsub::Subscription