Class MockDataCatalogConnection (2.28.0)

A class to mock DataCatalogConnection.

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

virtual SearchCatalog(google::cloud::datacatalog::v1::SearchCatalogRequest)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::SearchCatalogRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::SearchCatalogResult >

virtual CreateEntryGroup(google::cloud::datacatalog::v1::CreateEntryGroupRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::CreateEntryGroupRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::EntryGroup >

virtual GetEntryGroup(google::cloud::datacatalog::v1::GetEntryGroupRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::GetEntryGroupRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::EntryGroup >

virtual UpdateEntryGroup(google::cloud::datacatalog::v1::UpdateEntryGroupRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UpdateEntryGroupRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::EntryGroup >

virtual DeleteEntryGroup(google::cloud::datacatalog::v1::DeleteEntryGroupRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::DeleteEntryGroupRequest const &
Returns
Type Description
Status

virtual ListEntryGroups(google::cloud::datacatalog::v1::ListEntryGroupsRequest)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::ListEntryGroupsRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::EntryGroup >

virtual CreateEntry(google::cloud::datacatalog::v1::CreateEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::CreateEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Entry >

virtual UpdateEntry(google::cloud::datacatalog::v1::UpdateEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UpdateEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Entry >

virtual DeleteEntry(google::cloud::datacatalog::v1::DeleteEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::DeleteEntryRequest const &
Returns
Type Description
Status

virtual GetEntry(google::cloud::datacatalog::v1::GetEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::GetEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Entry >

virtual LookupEntry(google::cloud::datacatalog::v1::LookupEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::LookupEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Entry >

virtual ListEntries(google::cloud::datacatalog::v1::ListEntriesRequest)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::ListEntriesRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::Entry >

virtual ModifyEntryOverview(google::cloud::datacatalog::v1::ModifyEntryOverviewRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::ModifyEntryOverviewRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::EntryOverview >

virtual ModifyEntryContacts(google::cloud::datacatalog::v1::ModifyEntryContactsRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::ModifyEntryContactsRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Contacts >

virtual CreateTagTemplate(google::cloud::datacatalog::v1::CreateTagTemplateRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::CreateTagTemplateRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplate >

virtual GetTagTemplate(google::cloud::datacatalog::v1::GetTagTemplateRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::GetTagTemplateRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplate >

virtual UpdateTagTemplate(google::cloud::datacatalog::v1::UpdateTagTemplateRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UpdateTagTemplateRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplate >

virtual DeleteTagTemplate(google::cloud::datacatalog::v1::DeleteTagTemplateRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::DeleteTagTemplateRequest const &
Returns
Type Description
Status

virtual CreateTagTemplateField(google::cloud::datacatalog::v1::CreateTagTemplateFieldRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::CreateTagTemplateFieldRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplateField >

virtual UpdateTagTemplateField(google::cloud::datacatalog::v1::UpdateTagTemplateFieldRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UpdateTagTemplateFieldRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplateField >

virtual RenameTagTemplateField(google::cloud::datacatalog::v1::RenameTagTemplateFieldRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::RenameTagTemplateFieldRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplateField >

virtual RenameTagTemplateFieldEnumValue(google::cloud::datacatalog::v1::RenameTagTemplateFieldEnumValueRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::RenameTagTemplateFieldEnumValueRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::TagTemplateField >

virtual DeleteTagTemplateField(google::cloud::datacatalog::v1::DeleteTagTemplateFieldRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::DeleteTagTemplateFieldRequest const &
Returns
Type Description
Status

virtual CreateTag(google::cloud::datacatalog::v1::CreateTagRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::CreateTagRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Tag >

virtual UpdateTag(google::cloud::datacatalog::v1::UpdateTagRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UpdateTagRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::Tag >

virtual DeleteTag(google::cloud::datacatalog::v1::DeleteTagRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::DeleteTagRequest const &
Returns
Type Description
Status

virtual ListTags(google::cloud::datacatalog::v1::ListTagsRequest)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::ListTagsRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::v1::Tag >

virtual ReconcileTags(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::datacatalog::v1::ReconcileTagsResponse > >

virtual StarEntry(google::cloud::datacatalog::v1::StarEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::StarEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::StarEntryResponse >

virtual UnstarEntry(google::cloud::datacatalog::v1::UnstarEntryRequest const &)

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

Parameter
Name Description
request google::cloud::datacatalog::v1::UnstarEntryRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::v1::UnstarEntryResponse >

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &)

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

Parameter
Name Description
request google::iam::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &)

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

Parameter
Name Description
request google::iam::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &)

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

Parameter
Name Description
request google::iam::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual ImportEntries(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::datacatalog::v1::ImportEntriesResponse > >