Class MockExactlyOnceAckHandler (2.28.0)

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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
pubsub::Subscription