Class MockParticipantsConnection (2.23.0-rc)

A class to mock ParticipantsConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ParticipantsClient. To do so, construct an object of type ParticipantsClient 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 CreateParticipant(google::cloud::dialogflow::v2::CreateParticipantRequest 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::v2::CreateParticipantRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::Participant >

virtual GetParticipant(google::cloud::dialogflow::v2::GetParticipantRequest 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::v2::GetParticipantRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::Participant >

virtual ListParticipants(google::cloud::dialogflow::v2::ListParticipantsRequest)

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::v2::ListParticipantsRequest
Returns
TypeDescription
StreamRange< google::cloud::dialogflow::v2::Participant >

virtual UpdateParticipant(google::cloud::dialogflow::v2::UpdateParticipantRequest 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::v2::UpdateParticipantRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::Participant >

virtual AnalyzeContent(google::cloud::dialogflow::v2::AnalyzeContentRequest 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::v2::AnalyzeContentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::AnalyzeContentResponse >

virtual AsyncStreamingAnalyzeContent()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
std::unique_ptr<::google::cloud::AsyncStreamingReadWriteRpc< google::cloud::dialogflow::v2::StreamingAnalyzeContentRequest, google::cloud::dialogflow::v2::StreamingAnalyzeContentResponse > >

virtual SuggestArticles(google::cloud::dialogflow::v2::SuggestArticlesRequest 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::v2::SuggestArticlesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::SuggestArticlesResponse >

virtual SuggestFaqAnswers(google::cloud::dialogflow::v2::SuggestFaqAnswersRequest 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::v2::SuggestFaqAnswersRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::SuggestFaqAnswersResponse >

virtual SuggestSmartReplies(google::cloud::dialogflow::v2::SuggestSmartRepliesRequest 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::v2::SuggestSmartRepliesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::dialogflow::v2::SuggestSmartRepliesResponse >