Google Cloud BigQuery C++ Client 2.11.0
A C++ Client Library for Google Cloud BigQuery
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection Class Reference

A class to mock BigQueryReadConnection. More...

#include <google/cloud/bigquery/storage/v1/mocks/mock_bigquery_read_connection.h>

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StatusOr< google::cloud::bigquery::storage::v1::ReadSession >, CreateReadSession,(google::cloud::bigquery::storage::v1::CreateReadSessionRequest const &request),(override))
 
 MOCK_METHOD (StreamRange< google::cloud::bigquery::storage::v1::ReadRowsResponse >, ReadRows,(google::cloud::bigquery::storage::v1::ReadRowsRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::cloud::bigquery::storage::v1::SplitReadStreamResponse >, SplitReadStream,(google::cloud::bigquery::storage::v1::SplitReadStreamRequest const &request),(override))
 
virtual Options options ()
 
virtual StatusOr< google::cloud::bigquery::storage::v1::ReadSession > CreateReadSession (google::cloud::bigquery::storage::v1::CreateReadSessionRequest const &request)
 
virtual StreamRange< google::cloud::bigquery::storage::v1::ReadRowsResponse > ReadRows (google::cloud::bigquery::storage::v1::ReadRowsRequest const &request)
 
virtual StatusOr< google::cloud::bigquery::storage::v1::SplitReadStreamResponse > SplitReadStream (google::cloud::bigquery::storage::v1::SplitReadStreamRequest const &request)
 

Detailed Description

A class to mock BigQueryReadConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type BigQueryReadClient. To do so, construct an object of type BigQueryReadClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See also
This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Member Function Documentation

◆ CreateReadSession()

virtual StatusOr< google::cloud::bigquery::storage::v1::ReadSession > google::cloud::bigquery_storage_v1::BigQueryReadConnection::CreateReadSession ( google::cloud::bigquery::storage::v1::CreateReadSessionRequest const &  request)
virtualinherited

◆ MOCK_METHOD() [1/4]

google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [2/4]

google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection::MOCK_METHOD ( StatusOr< google::cloud::bigquery::storage::v1::ReadSession >  ,
CreateReadSession  ,
(google::cloud::bigquery::storage::v1::CreateReadSessionRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/4]

google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection::MOCK_METHOD ( StatusOr< google::cloud::bigquery::storage::v1::SplitReadStreamResponse >  ,
SplitReadStream  ,
(google::cloud::bigquery::storage::v1::SplitReadStreamRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [4/4]

google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection::MOCK_METHOD ( StreamRange< google::cloud::bigquery::storage::v1::ReadRowsResponse >  ,
ReadRows  ,
(google::cloud::bigquery::storage::v1::ReadRowsRequest const &request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::bigquery_storage_v1::BigQueryReadConnection::options ( )
inlinevirtualinherited

◆ ReadRows()

virtual StreamRange< google::cloud::bigquery::storage::v1::ReadRowsResponse > google::cloud::bigquery_storage_v1::BigQueryReadConnection::ReadRows ( google::cloud::bigquery::storage::v1::ReadRowsRequest const &  request)
virtualinherited

◆ SplitReadStream()

virtual StatusOr< google::cloud::bigquery::storage::v1::SplitReadStreamResponse > google::cloud::bigquery_storage_v1::BigQueryReadConnection::SplitReadStream ( google::cloud::bigquery::storage::v1::SplitReadStreamRequest const &  request)
virtualinherited