Send feedback
Class MockParticipantsConnection (2.36.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.36.0 keyboard_arrow_down
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
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::CreateParticipantRequest const &
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::GetParticipantRequest const &
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::ListParticipantsRequest
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::UpdateParticipantRequest const &
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::AnalyzeContentRequest const &
Returns
Type
Description
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
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::SuggestArticlesRequest const &
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::SuggestFaqAnswersRequest const &
Returns
Type
Description
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
Name
Description
request
google::cloud::dialogflow::v2::SuggestSmartRepliesRequest const &
Returns
Type
Description
StatusOr< google::cloud::dialogflow::v2::SuggestSmartRepliesResponse >
virtual SuggestKnowledgeAssist(google::cloud::dialogflow::v2::SuggestKnowledgeAssistRequest 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::v2::SuggestKnowledgeAssistRequest const &
Returns
Type
Description
StatusOr< google::cloud::dialogflow::v2::SuggestKnowledgeAssistResponse >
virtual ListLocations(google::cloud::location::ListLocationsRequest)
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::location::ListLocationsRequest
Returns
Type
Description
StreamRange< google::cloud::location::Location >
virtual GetLocation(google::cloud::location::GetLocationRequest 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::location::GetLocationRequest const &
Returns
Type
Description
StatusOr< google::cloud::location::Location >
virtual ListOperations(google::longrunning::ListOperationsRequest)
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::longrunning::ListOperationsRequest
Returns
Type
Description
StreamRange< google::longrunning::Operation >
virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
Returns
Type
Description
StatusOr< google::longrunning::Operation >
virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
Returns
Type
Description
Status
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[[["This webpage provides documentation for the `MockParticipantsConnection` class, which is used for simulating responses and errors from a `ParticipantsClient` object within the Google Test framework."],["The documentation covers multiple versions of the class, ranging from version 2.11.0 up to the latest release candidate 2.37.0-rc, with each version having it's own link to a dedicated page."],["The `MockParticipantsConnection` class uses gMock's `MOCK_METHOD()` to implement various functions, including managing participant creation, retrieval, listing, updating, content analysis, and smart suggestions."],["There are also functions to manage long-running operations and location requests such as listing, retrieving, or canceling operations and locations."],["This class allows developers to program the behavior of the mock object, enabling them to rigorously test their applications' interaction with the `ParticipantsClient`."]]],[]]