Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
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))
 
 MOCK_METHOD (google::cloud::Options, options,(),(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...
 
virtual StatusOr< PullResponse > Pull ()
 
virtual Options options ()
 Returns the configuration parameters for this object. 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.

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/3]

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

◆ MOCK_METHOD() [2/3]

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

◆ MOCK_METHOD() [3/3]

google::cloud::pubsub_mocks::MockSubscriberConnection::MOCK_METHOD ( google::cloud::Options  ,
options  ,
()  ,
(override)   
)

◆ options()

virtual Options google::cloud::pubsub::SubscriberConnection::options ( )
inlinevirtualinherited

Returns the configuration parameters for this object.

◆ Pull()

virtual StatusOr< PullResponse > google::cloud::pubsub::SubscriberConnection::Pull ( )
virtualinherited

◆ Subscribe()

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

Defines the interface for Subscriber::Subscribe(ApplicationCallback)