Coverage Report

Created: 2023-11-12 09:30

/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
243k
MockRequestDecoder::MockRequestDecoder() {
10
243k
  ON_CALL(*this, decodeHeaders_(_, _))
11
243k
      .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.9k
        ASSERT_NE(nullptr, headers->Method());
15
28.9k
      }));
16
243k
}
Envoy::Http::MockRequestDecoder::MockRequestDecoder()
Line
Count
Source
9
243k
MockRequestDecoder::MockRequestDecoder() {
10
243k
  ON_CALL(*this, decodeHeaders_(_, _))
11
243k
      .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
243k
        ASSERT_NE(nullptr, headers->Method());
15
243k
      }));
16
243k
}
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
243k
MockRequestDecoder::~MockRequestDecoder() = default;
18
19
221k
MockResponseDecoder::MockResponseDecoder() {
20
221k
  ON_CALL(*this, decodeHeaders_(_, _))
21
221k
      .WillByDefault(Invoke(
22
221k
          [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); }));
23
221k
}
Envoy::Http::MockResponseDecoder::MockResponseDecoder()
Line
Count
Source
19
218k
MockResponseDecoder::MockResponseDecoder() {
20
218k
  ON_CALL(*this, decodeHeaders_(_, _))
21
218k
      .WillByDefault(Invoke(
22
218k
          [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); }));
23
218k
}
Envoy::Http::MockResponseDecoder::MockResponseDecoder()
Line
Count
Source
19
3.07k
MockResponseDecoder::MockResponseDecoder() {
20
3.07k
  ON_CALL(*this, decodeHeaders_(_, _))
21
3.07k
      .WillByDefault(Invoke(
22
3.07k
          [](ResponseHeaderMapPtr& headers, bool) { ASSERT_NE(nullptr, headers->Status()); }));
23
3.07k
}
24
221k
MockResponseDecoder::~MockResponseDecoder() = default;
25
26
} // namespace Http
27
} // namespace Envoy