Google Cloud Pub/Sub C++ Client  2.1.0
A C++ Client Library for Google Cloud Pub/Sub
Public Member Functions | List of all members
google::cloud::pubsub_mocks::MockSubscriberConnection Class Reference

A googlemock-based mock for pubsub::SubscriberConnection. More...

#include <google/cloud/pubsub/mocks/mock_subscriber_connection.h>

Public Member Functions

 MOCK_METHOD (future< Status >, Subscribe,(pubsub::SubscriberConnection::SubscribeParams),(override))
 
 MOCK_METHOD (future< Status >, ExactlyOnceSubscribe,(pubsub::SubscriberConnection::ExactlyOnceSubscribeParams),(override))
 
virtual future< StatusSubscribe (SubscribeParams p)
 Defines the interface for Subscriber::Subscribe(ApplicationCallback) More...
 
virtual future< StatusExactlyOnceSubscribe (ExactlyOnceSubscribeParams p)
 Defines the interface for Subscriber::Subscribe(ExactlyOnceApplicationCallback). More...
 

Detailed Description

A googlemock-based mock for pubsub::SubscriberConnection.

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

Definition at line 33 of file mock_subscriber_connection.h.

Member Function Documentation

◆ ExactlyOnceSubscribe()

virtual future<Status> google::cloud::pubsub::SubscriberConnection::ExactlyOnceSubscribe ( ExactlyOnceSubscribeParams  p)
virtualinherited

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.

◆ MOCK_METHOD() [1/2]

google::cloud::pubsub_mocks::MockSubscriberConnection::MOCK_METHOD ( future< Status ,
ExactlyOnceSubscribe  ,
(pubsub::SubscriberConnection::ExactlyOnceSubscribeParams ,
(override)   
)

◆ MOCK_METHOD() [2/2]

google::cloud::pubsub_mocks::MockSubscriberConnection::MOCK_METHOD ( future< Status ,
Subscribe  ,
(pubsub::SubscriberConnection::SubscribeParams ,
(override)   
)

◆ Subscribe()

virtual future<Status> google::cloud::pubsub::SubscriberConnection::Subscribe ( SubscribeParams  p)
virtualinherited

Defines the interface for Subscriber::Subscribe(ApplicationCallback)