Coverage Report

Created: 2023-11-12 09:30

/proc/self/cwd/test/mocks/server/config_tracker.cc
Line
Count
Source
1
#include "config_tracker.h"
2
3
#include <string>
4
5
#include "gmock/gmock.h"
6
#include "gtest/gtest.h"
7
8
namespace Envoy {
9
namespace Server {
10
11
using ::testing::_;
12
using ::testing::Invoke;
13
14
27.3k
MockConfigTracker::MockConfigTracker() {
15
27.3k
  ON_CALL(*this, add_(_, _))
16
27.3k
      .WillByDefault(Invoke([this](const std::string& key, Cb callback) -> EntryOwner* {
17
16.2k
        EXPECT_TRUE(config_tracker_callbacks_.find(key) == config_tracker_callbacks_.end());
18
16.2k
        config_tracker_callbacks_[key] = callback;
19
16.2k
        return new MockEntryOwner();
20
16.2k
      }));
21
27.3k
}
22
23
27.3k
MockConfigTracker::~MockConfigTracker() = default;
24
25
} // namespace Server
26
} // namespace Envoy