AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MockHTTP2Request.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_ACL_TEST_TRANSPORT_MOCKHTTP2REQUEST_H_
17 #define ALEXA_CLIENT_SDK_ACL_TEST_TRANSPORT_MOCKHTTP2REQUEST_H_
18 
19 #include <memory>
20 #include <string>
21 
22 #include <gmock/gmock.h>
23 #include <gtest/gtest.h>
24 
28 
29 #include "MockMimeResponseSink.h"
30 
31 namespace alexaClientSDK {
32 namespace avsCommon {
33 namespace utils {
34 namespace http2 {
35 namespace test {
36 
41 public:
43  MOCK_METHOD0(cancel, bool());
45 
51  const std::string getUrl();
52 
58  std::shared_ptr<HTTP2RequestSourceInterface> getSource();
59 
65  std::shared_ptr<HTTP2ResponseSinkInterface> getSink();
66 
73 
79  std::shared_ptr<acl::test::MockMimeResponseSink> getMimeResponseSink();
80 
86  std::shared_ptr<HTTP2MimeResponseDecoder> getMimeDecoder();
87 
88 private:
90  const std::string m_url;
91 
93  std::shared_ptr<HTTP2RequestSourceInterface> m_source;
94 
96  std::shared_ptr<HTTP2ResponseSinkInterface> m_sink;
97 
99  HTTP2RequestType m_type;
100 
102  std::shared_ptr<acl::test::MockMimeResponseSink> m_mimeResponseSink;
103 
105  std::shared_ptr<HTTP2MimeResponseDecoder> m_mimeDecoder;
106 };
107 
108 } // namespace test
109 } // namespace http2
110 } // namespace utils
111 } // namespace avsCommon
112 } // namespace alexaClientSDK
113 
114 #endif /* ALEXA_CLIENT_SDK_ACL_TEST_TRANSPORT_MOCKHTTP2REQUEST_H_ */
const std::string getUrl()
Definition: MockHTTP2Request.cpp:33
Definition: AmdMetricWrapperTest.cpp:24
::std::string string
Definition: gtest-port.h:1097
MockHTTP2Request(const alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig &config)
Definition: MockHTTP2Request.cpp:24
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::shared_ptr< HTTP2MimeResponseDecoder > getMimeDecoder()
Definition: MockHTTP2Request.cpp:53
std::shared_ptr< acl::test::MockMimeResponseSink > getMimeResponseSink()
Definition: MockHTTP2Request.cpp:49
std::shared_ptr< HTTP2RequestSourceInterface > getSource()
Definition: MockHTTP2Request.cpp:37
HTTP2RequestType getRequestType()
Definition: MockHTTP2Request.cpp:45
std::shared_ptr< HTTP2ResponseSinkInterface > getSink()
Definition: MockHTTP2Request.cpp:41
HTTP2RequestType
Definition: HTTP2RequestType.h:29

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0