Class MockEnvironmentsConnection (2.13.0)

A class to mock EnvironmentsConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type EnvironmentsClient. To do so, construct an object of type EnvironmentsClient 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 ListEnvironments(google::cloud::dialogflow::cx::v3::ListEnvironmentsRequest)

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::dialogflow::cx::v3::ListEnvironmentsRequest
Returns
Type Description
StreamRange< google::cloud::dialogflow::cx::v3::Environment >

virtual GetEnvironment(google::cloud::dialogflow::cx::v3::GetEnvironmentRequest 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::dialogflow::cx::v3::GetEnvironmentRequest const &
Returns
Type Description
StatusOr< google::cloud::dialogflow::cx::v3::Environment >

virtual CreateEnvironment(google::cloud::dialogflow::cx::v3::CreateEnvironmentRequest 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::dialogflow::cx::v3::CreateEnvironmentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > >

virtual UpdateEnvironment(google::cloud::dialogflow::cx::v3::UpdateEnvironmentRequest 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::dialogflow::cx::v3::UpdateEnvironmentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > >

virtual DeleteEnvironment(google::cloud::dialogflow::cx::v3::DeleteEnvironmentRequest 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::dialogflow::cx::v3::DeleteEnvironmentRequest const &
Returns
Type Description
Status

virtual LookupEnvironmentHistory(google::cloud::dialogflow::cx::v3::LookupEnvironmentHistoryRequest)

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::dialogflow::cx::v3::LookupEnvironmentHistoryRequest
Returns
Type Description
StreamRange< google::cloud::dialogflow::cx::v3::Environment >

virtual RunContinuousTest(google::cloud::dialogflow::cx::v3::RunContinuousTestRequest 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::dialogflow::cx::v3::RunContinuousTestRequest const &
Returns
Type Description
future< StatusOr< google::cloud::dialogflow::cx::v3::RunContinuousTestResponse > >

virtual ListContinuousTestResults(google::cloud::dialogflow::cx::v3::ListContinuousTestResultsRequest)

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::dialogflow::cx::v3::ListContinuousTestResultsRequest
Returns
Type Description
StreamRange< google::cloud::dialogflow::cx::v3::ContinuousTestResult >

virtual DeployFlow(google::cloud::dialogflow::cx::v3::DeployFlowRequest 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::dialogflow::cx::v3::DeployFlowRequest const &
Returns
Type Description
future< StatusOr< google::cloud::dialogflow::cx::v3::DeployFlowResponse > >