A googlemock-based mock for pubsub::SubscriberConnection
.
See Also
Testing your Cloud Pub/Sub subscriber application with googlemock for an example using this class.
Functions
virtual Subscribe(SubscribeParams)
Defines the interface for Subscriber::Subscribe(ApplicationCallback)
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter | |
---|---|
Name | Description |
p |
SubscribeParams
|
Returns | |
---|---|
Type | Description |
future< Status > |
virtual ExactlyOnceSubscribe(ExactlyOnceSubscribeParams)
Defines the interface for Subscriber::Subscribe(ExactlyOnceApplicationCallback)
.
We use a different name for this function (as opposed to an overload) to simplify the use of mocks.
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter | |
---|---|
Name | Description |
p |
ExactlyOnceSubscribeParams
|
Returns | |
---|---|
Type | Description |
future< Status > |
virtual Pull()
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Returns | |
---|---|
Type | Description |
StatusOr< PullResponse > |
virtual options()
Returns the configuration parameters for this object.
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Returns | |
---|---|
Type | Description |
Options |