Class MockMetastoreServiceConnection (2.13.0)

A class to mock MetastoreServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type MetastoreServiceClient. To do so, construct an object of type MetastoreServiceClient 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.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
Options

virtual CreateCatalog(google::cloud::bigquery::biglake::v1::CreateCatalogRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::CreateCatalogRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Catalog >

virtual DeleteCatalog(google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::DeleteCatalogRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Catalog >

virtual GetCatalog(google::cloud::bigquery::biglake::v1::GetCatalogRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::GetCatalogRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Catalog >

virtual ListCatalogs(google::cloud::bigquery::biglake::v1::ListCatalogsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::ListCatalogsRequest
Returns
TypeDescription
StreamRange< google::cloud::bigquery::biglake::v1::Catalog >

virtual CreateDatabase(google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::CreateDatabaseRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Database >

virtual DeleteDatabase(google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::DeleteDatabaseRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Database >

virtual UpdateDatabase(google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::UpdateDatabaseRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Database >

virtual GetDatabase(google::cloud::bigquery::biglake::v1::GetDatabaseRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::GetDatabaseRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Database >

virtual ListDatabases(google::cloud::bigquery::biglake::v1::ListDatabasesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::ListDatabasesRequest
Returns
TypeDescription
StreamRange< google::cloud::bigquery::biglake::v1::Database >

virtual CreateTable(google::cloud::bigquery::biglake::v1::CreateTableRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::CreateTableRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Table >

virtual DeleteTable(google::cloud::bigquery::biglake::v1::DeleteTableRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::DeleteTableRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Table >

virtual UpdateTable(google::cloud::bigquery::biglake::v1::UpdateTableRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::UpdateTableRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Table >

virtual RenameTable(google::cloud::bigquery::biglake::v1::RenameTableRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::RenameTableRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Table >

virtual GetTable(google::cloud::bigquery::biglake::v1::GetTableRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::GetTableRequest const &
Returns
TypeDescription
StatusOr< google::cloud::bigquery::biglake::v1::Table >

virtual ListTables(google::cloud::bigquery::biglake::v1::ListTablesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::bigquery::biglake::v1::ListTablesRequest
Returns
TypeDescription
StreamRange< google::cloud::bigquery::biglake::v1::Table >