/proc/self/cwd/test/mocks/init/mocks.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #include "test/mocks/init/mocks.h" |
2 | | |
3 | | namespace Envoy { |
4 | | namespace Init { |
5 | | |
6 | | using ::testing::Invoke; |
7 | | |
8 | | ExpectableWatcherImpl::ExpectableWatcherImpl(absl::string_view name) |
9 | 0 | : WatcherImpl(name, {[this]() { ready(); }}) {} |
10 | 0 | ::testing::internal::TypedExpectation<void()>& ExpectableWatcherImpl::expectReady() const { |
11 | 0 | return EXPECT_CALL(*this, ready()); |
12 | 0 | } |
13 | | |
14 | | ExpectableTargetImpl::ExpectableTargetImpl(absl::string_view name) |
15 | 0 | : TargetImpl(name, {[this]() { initialize(); }}) {} |
16 | 0 | ::testing::internal::TypedExpectation<void()>& ExpectableTargetImpl::expectInitialize() { |
17 | 0 | return EXPECT_CALL(*this, initialize()); |
18 | 0 | } |
19 | | ::testing::internal::TypedExpectation<void()>& |
20 | 0 | ExpectableTargetImpl::expectInitializeWillCallReady() { |
21 | 0 | return expectInitialize().WillOnce(Invoke([this]() { ready(); })); |
22 | 0 | } |
23 | | |
24 | | ExpectableSharedTargetImpl::ExpectableSharedTargetImpl(absl::string_view name) |
25 | 0 | : ExpectableSharedTargetImpl(name, [this]() { initialize(); }) {} |
26 | | ExpectableSharedTargetImpl::ExpectableSharedTargetImpl(absl::string_view name, InitializeFn fn) |
27 | 0 | : SharedTargetImpl(name, fn) {} |
28 | 0 | ::testing::internal::TypedExpectation<void()>& ExpectableSharedTargetImpl::expectInitialize() { |
29 | 0 | return EXPECT_CALL(*this, initialize()); |
30 | 0 | } |
31 | | } // namespace Init |
32 | | } // namespace Envoy |