Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
mock_test_cases_connection.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/cloud/dialogflow/cx/v3/test_case.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_TEST_CASES_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_TEST_CASES_CONNECTION_H
21
22#include "google/cloud/dialogflow_cx/test_cases_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace dialogflow_cx_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `TestCasesConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `TestCasesClient`. To do so,
35 * construct an object of type `TestCasesClient` with an instance of this
36 * class. Then use the Google Test framework functions to program the behavior
37 * of this mock.
38 *
39 * @see [This example][bq-mock] for how to test your application with GoogleTest.
40 * While the example showcases types from the BigQuery library, the underlying
41 * principles apply for any pair of `*Client` and `*Connection`.
42 *
43 * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock}
44 */
46 public:
47 MOCK_METHOD(Options, options, (), (override));
48
49 MOCK_METHOD(StreamRange<google::cloud::dialogflow::cx::v3::TestCase>,
50 ListTestCases,
51 (google::cloud::dialogflow::cx::v3::ListTestCasesRequest request),
52 (override));
53
54 MOCK_METHOD(
55 Status, BatchDeleteTestCases,
56 (google::cloud::dialogflow::cx::v3::BatchDeleteTestCasesRequest const&
57 request),
58 (override));
59
60 MOCK_METHOD(
61 StatusOr<google::cloud::dialogflow::cx::v3::TestCase>, GetTestCase,
62 (google::cloud::dialogflow::cx::v3::GetTestCaseRequest const& request),
63 (override));
64
65 MOCK_METHOD(
66 StatusOr<google::cloud::dialogflow::cx::v3::TestCase>, CreateTestCase,
67 (google::cloud::dialogflow::cx::v3::CreateTestCaseRequest const& request),
68 (override));
69
70 MOCK_METHOD(
71 StatusOr<google::cloud::dialogflow::cx::v3::TestCase>, UpdateTestCase,
72 (google::cloud::dialogflow::cx::v3::UpdateTestCaseRequest const& request),
73 (override));
74
75 MOCK_METHOD(
76 future<StatusOr<google::cloud::dialogflow::cx::v3::RunTestCaseResponse>>,
77 RunTestCase,
78 (google::cloud::dialogflow::cx::v3::RunTestCaseRequest const& request),
79 (override));
80
81 MOCK_METHOD(
82 future<StatusOr<
83 google::cloud::dialogflow::cx::v3::BatchRunTestCasesResponse>>,
84 BatchRunTestCases,
85 (google::cloud::dialogflow::cx::v3::BatchRunTestCasesRequest const&
86 request),
87 (override));
88
89 MOCK_METHOD(
90 StatusOr<google::cloud::dialogflow::cx::v3::CalculateCoverageResponse>,
91 CalculateCoverage,
92 (google::cloud::dialogflow::cx::v3::CalculateCoverageRequest const&
93 request),
94 (override));
95
96 MOCK_METHOD(
97 future<
98 StatusOr<google::cloud::dialogflow::cx::v3::ImportTestCasesResponse>>,
99 ImportTestCases,
100 (google::cloud::dialogflow::cx::v3::ImportTestCasesRequest const&
101 request),
102 (override));
103
104 MOCK_METHOD(
105 future<
106 StatusOr<google::cloud::dialogflow::cx::v3::ExportTestCasesResponse>>,
107 ExportTestCases,
108 (google::cloud::dialogflow::cx::v3::ExportTestCasesRequest const&
109 request),
110 (override));
111
112 MOCK_METHOD(
113 StreamRange<google::cloud::dialogflow::cx::v3::TestCaseResult>,
114 ListTestCaseResults,
115 (google::cloud::dialogflow::cx::v3::ListTestCaseResultsRequest request),
116 (override));
117
118 MOCK_METHOD(
119 StatusOr<google::cloud::dialogflow::cx::v3::TestCaseResult>,
120 GetTestCaseResult,
121 (google::cloud::dialogflow::cx::v3::GetTestCaseResultRequest const&
122 request),
123 (override));
124};
125
126GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
127} // namespace dialogflow_cx_mocks
128} // namespace cloud
129} // namespace google
130
131#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_TEST_CASES_CONNECTION_H
The TestCasesConnection object for TestCasesClient.
Definition: test_cases_connection.h:64
A class to mock TestCasesConnection.
Definition: mock_test_cases_connection.h:45
friend friend class future
Definition: mock_agents_connection.h:27
Definition: agents_client.h:33