A class to mock CatalogServiceConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type CatalogServiceClient
. To do so, construct an object of type CatalogServiceClient
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 CreateEntryType(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::dataplex::v1::EntryType > > |
|
virtual UpdateEntryType(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::dataplex::v1::EntryType > > |
|
virtual DeleteEntryType(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::dataplex::v1::OperationMetadata > > |
|
virtual ListEntryTypes(google::cloud::dataplex::v1::ListEntryTypesRequest)
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::dataplex::v1::ListEntryTypesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::EntryType > |
|
virtual GetEntryType(google::cloud::dataplex::v1::GetEntryTypeRequest 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::dataplex::v1::GetEntryTypeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::EntryType > |
|
virtual CreateAspectType(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::dataplex::v1::AspectType > > |
|
virtual UpdateAspectType(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::dataplex::v1::AspectType > > |
|
virtual DeleteAspectType(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::dataplex::v1::OperationMetadata > > |
|
virtual ListAspectTypes(google::cloud::dataplex::v1::ListAspectTypesRequest)
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::dataplex::v1::ListAspectTypesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::AspectType > |
|
virtual GetAspectType(google::cloud::dataplex::v1::GetAspectTypeRequest 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::dataplex::v1::GetAspectTypeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::AspectType > |
|
virtual CreateEntryGroup(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::dataplex::v1::EntryGroup > > |
|
virtual UpdateEntryGroup(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::dataplex::v1::EntryGroup > > |
|
virtual DeleteEntryGroup(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::dataplex::v1::OperationMetadata > > |
|
virtual ListEntryGroups(google::cloud::dataplex::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::dataplex::v1::ListEntryGroupsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::EntryGroup > |
|
virtual GetEntryGroup(google::cloud::dataplex::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::dataplex::v1::GetEntryGroupRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::EntryGroup > |
|
virtual CreateEntry(google::cloud::dataplex::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::dataplex::v1::CreateEntryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Entry > |
|
virtual UpdateEntry(google::cloud::dataplex::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::dataplex::v1::UpdateEntryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Entry > |
|
virtual DeleteEntry(google::cloud::dataplex::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::dataplex::v1::DeleteEntryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Entry > |
|
virtual ListEntries(google::cloud::dataplex::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::dataplex::v1::ListEntriesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::Entry > |
|
virtual GetEntry(google::cloud::dataplex::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::dataplex::v1::GetEntryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Entry > |
|
virtual LookupEntry(google::cloud::dataplex::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::dataplex::v1::LookupEntryRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::Entry > |
|
virtual SearchEntries(google::cloud::dataplex::v1::SearchEntriesRequest)
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::dataplex::v1::SearchEntriesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::SearchEntriesResult > |
|
virtual CreateMetadataJob(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::dataplex::v1::MetadataJob > > |
|
virtual GetMetadataJob(google::cloud::dataplex::v1::GetMetadataJobRequest 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::dataplex::v1::GetMetadataJobRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::dataplex::v1::MetadataJob > |
|
virtual ListMetadataJobs(google::cloud::dataplex::v1::ListMetadataJobsRequest)
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::dataplex::v1::ListMetadataJobsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::dataplex::v1::MetadataJob > |
|
virtual CancelMetadataJob(google::cloud::dataplex::v1::CancelMetadataJobRequest 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::dataplex::v1::CancelMetadataJobRequest const &
|
Returns |
Type |
Description |
Status |
|
virtual ListLocations(google::cloud::location::ListLocationsRequest)
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::location::ListLocationsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::location::Location > |
|
virtual GetLocation(google::cloud::location::GetLocationRequest 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::location::GetLocationRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::location::Location > |
|
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 ListOperations(google::longrunning::ListOperationsRequest)
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::longrunning::ListOperationsRequest
|
Returns |
Type |
Description |
StreamRange< google::longrunning::Operation > |
|
virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
|
Returns |
Type |
Description |
StatusOr< google::longrunning::Operation > |
|
virtual DeleteOperation(google::longrunning::DeleteOperationRequest 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::longrunning::DeleteOperationRequest const &
|
Returns |
Type |
Description |
Status |
|
virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
|
Returns |
Type |
Description |
Status |
|