Class MockDocumentProcessorServiceConnection (2.18.0-rc)

A class to mock DocumentProcessorServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type DocumentProcessorServiceClient. To do so, construct an object of type DocumentProcessorServiceClient 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 ProcessDocument(google::cloud::documentai::v1::ProcessRequest 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::documentai::v1::ProcessRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::ProcessResponse >

virtual BatchProcessDocuments(google::cloud::documentai::v1::BatchProcessRequest 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::documentai::v1::BatchProcessRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::BatchProcessResponse > >

virtual FetchProcessorTypes(google::cloud::documentai::v1::FetchProcessorTypesRequest 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::documentai::v1::FetchProcessorTypesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::FetchProcessorTypesResponse >

virtual ListProcessorTypes(google::cloud::documentai::v1::ListProcessorTypesRequest)

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::documentai::v1::ListProcessorTypesRequest
Returns
TypeDescription
StreamRange< google::cloud::documentai::v1::ProcessorType >

virtual GetProcessorType(google::cloud::documentai::v1::GetProcessorTypeRequest 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::documentai::v1::GetProcessorTypeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::ProcessorType >

virtual ListProcessors(google::cloud::documentai::v1::ListProcessorsRequest)

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::documentai::v1::ListProcessorsRequest
Returns
TypeDescription
StreamRange< google::cloud::documentai::v1::Processor >

virtual GetProcessor(google::cloud::documentai::v1::GetProcessorRequest 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::documentai::v1::GetProcessorRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::Processor >

virtual TrainProcessorVersion(google::cloud::documentai::v1::TrainProcessorVersionRequest 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::documentai::v1::TrainProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::TrainProcessorVersionResponse > >

virtual GetProcessorVersion(google::cloud::documentai::v1::GetProcessorVersionRequest 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::documentai::v1::GetProcessorVersionRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::ProcessorVersion >

virtual ListProcessorVersions(google::cloud::documentai::v1::ListProcessorVersionsRequest)

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::documentai::v1::ListProcessorVersionsRequest
Returns
TypeDescription
StreamRange< google::cloud::documentai::v1::ProcessorVersion >

virtual DeleteProcessorVersion(google::cloud::documentai::v1::DeleteProcessorVersionRequest 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::documentai::v1::DeleteProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorVersionMetadata > >

virtual DeployProcessorVersion(google::cloud::documentai::v1::DeployProcessorVersionRequest 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::documentai::v1::DeployProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::DeployProcessorVersionResponse > >

virtual UndeployProcessorVersion(google::cloud::documentai::v1::UndeployProcessorVersionRequest 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::documentai::v1::UndeployProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::UndeployProcessorVersionResponse > >

virtual CreateProcessor(google::cloud::documentai::v1::CreateProcessorRequest 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::documentai::v1::CreateProcessorRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::Processor >

virtual DeleteProcessor(google::cloud::documentai::v1::DeleteProcessorRequest 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::documentai::v1::DeleteProcessorRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorMetadata > >

virtual EnableProcessor(google::cloud::documentai::v1::EnableProcessorRequest 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::documentai::v1::EnableProcessorRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::EnableProcessorResponse > >

virtual DisableProcessor(google::cloud::documentai::v1::DisableProcessorRequest 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::documentai::v1::DisableProcessorRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::DisableProcessorResponse > >

virtual SetDefaultProcessorVersion(google::cloud::documentai::v1::SetDefaultProcessorVersionRequest 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::documentai::v1::SetDefaultProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::SetDefaultProcessorVersionResponse > >

virtual ReviewDocument(google::cloud::documentai::v1::ReviewDocumentRequest 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::documentai::v1::ReviewDocumentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::ReviewDocumentResponse > >

virtual EvaluateProcessorVersion(google::cloud::documentai::v1::EvaluateProcessorVersionRequest 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::documentai::v1::EvaluateProcessorVersionRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::documentai::v1::EvaluateProcessorVersionResponse > >

virtual GetEvaluation(google::cloud::documentai::v1::GetEvaluationRequest 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::documentai::v1::GetEvaluationRequest const &
Returns
TypeDescription
StatusOr< google::cloud::documentai::v1::Evaluation >

virtual ListEvaluations(google::cloud::documentai::v1::ListEvaluationsRequest)

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::documentai::v1::ListEvaluationsRequest
Returns
TypeDescription
StreamRange< google::cloud::documentai::v1::Evaluation >