Class MockLineageConnection (2.27.0)

A class to mock LineageConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type LineageClient. To do so, construct an object of type LineageClient 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 ProcessOpenLineageRunEvent(google::cloud::datacatalog::lineage::v1::ProcessOpenLineageRunEventRequest 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::lineage::v1::ProcessOpenLineageRunEventRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::ProcessOpenLineageRunEventResponse >

virtual CreateProcess(google::cloud::datacatalog::lineage::v1::CreateProcessRequest 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::lineage::v1::CreateProcessRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Process >

virtual UpdateProcess(google::cloud::datacatalog::lineage::v1::UpdateProcessRequest 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::lineage::v1::UpdateProcessRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Process >

virtual GetProcess(google::cloud::datacatalog::lineage::v1::GetProcessRequest 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::lineage::v1::GetProcessRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Process >

virtual ListProcesses(google::cloud::datacatalog::lineage::v1::ListProcessesRequest)

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::lineage::v1::ListProcessesRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::lineage::v1::Process >

virtual DeleteProcess(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::lineage::v1::OperationMetadata > >

virtual CreateRun(google::cloud::datacatalog::lineage::v1::CreateRunRequest 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::lineage::v1::CreateRunRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Run >

virtual UpdateRun(google::cloud::datacatalog::lineage::v1::UpdateRunRequest 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::lineage::v1::UpdateRunRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Run >

virtual GetRun(google::cloud::datacatalog::lineage::v1::GetRunRequest 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::lineage::v1::GetRunRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::Run >

virtual ListRuns(google::cloud::datacatalog::lineage::v1::ListRunsRequest)

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::lineage::v1::ListRunsRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::lineage::v1::Run >

virtual DeleteRun(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::lineage::v1::OperationMetadata > >

virtual CreateLineageEvent(google::cloud::datacatalog::lineage::v1::CreateLineageEventRequest 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::lineage::v1::CreateLineageEventRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::LineageEvent >

virtual GetLineageEvent(google::cloud::datacatalog::lineage::v1::GetLineageEventRequest 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::lineage::v1::GetLineageEventRequest const &
Returns
Type Description
StatusOr< google::cloud::datacatalog::lineage::v1::LineageEvent >

virtual ListLineageEvents(google::cloud::datacatalog::lineage::v1::ListLineageEventsRequest)

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::lineage::v1::ListLineageEventsRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::lineage::v1::LineageEvent >

virtual DeleteLineageEvent(google::cloud::datacatalog::lineage::v1::DeleteLineageEventRequest 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::lineage::v1::DeleteLineageEventRequest const &
Returns
Type Description
Status

virtual SearchLinks(google::cloud::datacatalog::lineage::v1::SearchLinksRequest)

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::lineage::v1::SearchLinksRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::lineage::v1::Link >

virtual BatchSearchLinkProcesses(google::cloud::datacatalog::lineage::v1::BatchSearchLinkProcessesRequest)

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::lineage::v1::BatchSearchLinkProcessesRequest
Returns
Type Description
StreamRange< google::cloud::datacatalog::lineage::v1::ProcessLinks >