10Duke Scale C++ Client
Loading...
Searching...
No Matches
HTTPTestUtils.h
1#ifndef TENDUKE_TEST_UTILS_HTTPUTILS_H
2#define TENDUKE_TEST_UTILS_HTTPUTILS_H
3
4#include "http/HTTPRequestBuilder.h"
5#include "../mocks/HTTPCallMock.h"
6#include "../mocks/HTTPClientMock.h"
7#include "../mocks/URLEncoderMock.h"
8
9#include "gmock/gmock.h"
10
11#include <memory>
12#include <string>
13
14namespace tenduke { namespace test { namespace utils {
15
16void stubHttpCalls(
17 std::shared_ptr<::tenduke::test::mocks::HTTPClientMock> httpClient,
18 std::initializer_list<std::shared_ptr<::tenduke::http::HTTPResponse>> responses
19);
20
21std::shared_ptr<::tenduke::http::HTTPResponse> mkJsonResponse(int statusCode, const std::string &payload);
22std::shared_ptr<::tenduke::http::HTTPResponse> mkHTTPResponse(int statusCode, const std::string &payload, const std::string &contentType = "");
23
24
25}}}
26
27
28#endif //TENDUKE_TEST_UTILS_HTTPUTILS_H
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7