/proc/self/cwd/test/mocks/http/stream_decoder.cc
Line | Count | Source |
1 | | #include "test/mocks/http/stream_decoder.h" |
2 | | |
3 | | using testing::_; |
4 | | using testing::Invoke; |
5 | | |
6 | | namespace Envoy { |
7 | | namespace Http { |
8 | | |
9 | 219k | MockRequestDecoder::MockRequestDecoder() { |
10 | 219k | ON_CALL(*this, decodeHeaders_(_, _)) |
11 | 219k | .WillByDefault(Invoke([](RequestHeaderMapSharedPtr& headers, bool) { |
12 | | // Check to see that method is not-null. Path can be null for CONNECT and authority can be |
13 | | // null at the codec level. |
14 | 28.3k | ASSERT_NE(nullptr, headers->Method()); |
15 | 28.3k | })); |
16 | 219k | } Envoy::Http::MockRequestDecoder::MockRequestDecoder() Line | Count | Source | 9 | 219k | MockRequestDecoder::MockRequestDecoder() { | 10 | 219k | ON_CALL(*this, decodeHeaders_(_, _)) | 11 | 219k | .WillByDefault(Invoke([](RequestHeaderMapSharedPtr& headers, bool) { | 12 | | // Check to see that method is not-null. Path can be null for CONNECT and authority can be | 13 | | // null at the codec level. | 14 | 219k | ASSERT_NE(nullptr, headers->Method()); | 15 | 219k | })); | 16 | 219k | } |
Envoy::Http::MockRequestDecoder::MockRequestDecoder() Line | Count | Source | 9 | 1 | MockRequestDecoder::MockRequestDecoder() { | 10 | 1 | ON_CALL(*this, decodeHeaders_(_, _)) | 11 | 1 | .WillByDefault(Invoke([](RequestHeaderMapSharedPtr& headers, bool) { | 12 | | // Check to see that method is not-null. Path can be null for CONNECT and authority can be | 13 | | // null at the codec level. | 14 | 1 | ASSERT_NE(nullptr, headers->Method()); | 15 | 1 | })); | 16 | 1 | } |
|
17 | 219k | MockRequestDecoder::~MockRequestDecoder() = default; |
18 | | |
19 | 203k | MockResponseDecoder::MockResponseDecoder() { |
20 | 203k | ON_CALL(*this, decodeHeaders_(_, _)) |
21 | 203k | .WillByDefault(Invoke( |
22 | 203k | [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); })); |
23 | 203k | } Envoy::Http::MockResponseDecoder::MockResponseDecoder() Line | Count | Source | 19 | 193k | MockResponseDecoder::MockResponseDecoder() { | 20 | 193k | ON_CALL(*this, decodeHeaders_(_, _)) | 21 | 193k | .WillByDefault(Invoke( | 22 | 193k | [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); })); | 23 | 193k | } |
Envoy::Http::MockResponseDecoder::MockResponseDecoder() Line | Count | Source | 19 | 9.82k | MockResponseDecoder::MockResponseDecoder() { | 20 | 9.82k | ON_CALL(*this, decodeHeaders_(_, _)) | 21 | 9.82k | .WillByDefault(Invoke( | 22 | 9.82k | [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); })); | 23 | 9.82k | } |
|
24 | 203k | MockResponseDecoder::~MockResponseDecoder() = default; |
25 | | |
26 | | } // namespace Http |
27 | | } // namespace Envoy |