Class MockExperimentsConnection (2.19.0)

A class to mock ExperimentsConnection.

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

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::dialogflow::cx::v3::ListExperimentsRequest
Returns
TypeDescription
StreamRange< google::cloud::dialogflow::cx::v3::Experiment >

virtual GetExperiment(google::cloud::dialogflow::cx::v3::GetExperimentRequest 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::dialogflow::cx::v3::GetExperimentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::cx::v3::Experiment >

virtual CreateExperiment(google::cloud::dialogflow::cx::v3::CreateExperimentRequest 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::dialogflow::cx::v3::CreateExperimentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::cx::v3::Experiment >

virtual UpdateExperiment(google::cloud::dialogflow::cx::v3::UpdateExperimentRequest 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::dialogflow::cx::v3::UpdateExperimentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::cx::v3::Experiment >

virtual DeleteExperiment(google::cloud::dialogflow::cx::v3::DeleteExperimentRequest 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::dialogflow::cx::v3::DeleteExperimentRequest const &
Returns
TypeDescription
Status

virtual StartExperiment(google::cloud::dialogflow::cx::v3::StartExperimentRequest 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::dialogflow::cx::v3::StartExperimentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::cx::v3::Experiment >

virtual StopExperiment(google::cloud::dialogflow::cx::v3::StopExperimentRequest 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::dialogflow::cx::v3::StopExperimentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::cx::v3::Experiment >