Class MockDataCatalogConnection (2.20.0-rc)

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
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::SearchCatalogRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::CreateEntryGroupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::GetEntryGroupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UpdateEntryGroupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::DeleteEntryGroupRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::ListEntryGroupsRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::CreateEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UpdateEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::DeleteEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::GetEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::LookupEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::ListEntriesRequest
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::ModifyEntryOverviewRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::ModifyEntryContactsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::CreateTagTemplateRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::GetTagTemplateRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UpdateTagTemplateRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::DeleteTagTemplateRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::CreateTagTemplateFieldRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UpdateTagTemplateFieldRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::RenameTagTemplateFieldRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::RenameTagTemplateFieldEnumValueRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::DeleteTagTemplateFieldRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::CreateTagRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UpdateTagRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::DeleteTagRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::ListTagsRequest
Returns
TypeDescription
StreamRange< google::cloud::datacatalog::v1::Tag >

virtual ReconcileTags(google::cloud::datacatalog::v1::ReconcileTagsRequest 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::datacatalog::v1::ReconcileTagsRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::StarEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::cloud::datacatalog::v1::UnstarEntryRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::SetIamPolicyRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::GetIamPolicyRequest const &
Returns
TypeDescription
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
NameDescription
request google::iam::v1::TestIamPermissionsRequest const &
Returns
TypeDescription
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual ImportEntries(google::cloud::datacatalog::v1::ImportEntriesRequest 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::datacatalog::v1::ImportEntriesRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::datacatalog::v1::ImportEntriesResponse > >