forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.cc
37 lines (26 loc) · 1 KB
/
common.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "test/mocks/common.h"
using testing::_;
using testing::ByMove;
using testing::Return;
namespace Envoy {
namespace ConnectionPool {
MockCancellable::MockCancellable() = default;
MockCancellable::~MockCancellable() = default;
} // namespace ConnectionPool
namespace Random {
MockRandomGenerator::MockRandomGenerator() { ON_CALL(*this, uuid()).WillByDefault(Return(uuid_)); }
MockRandomGenerator::MockRandomGenerator(uint64_t value) : value_(value) {
ON_CALL(*this, random()).WillByDefault(Return(value_));
ON_CALL(*this, uuid()).WillByDefault(Return(uuid_));
}
MockRandomGenerator::~MockRandomGenerator() = default;
} // namespace Random
ReadyWatcher::ReadyWatcher() = default;
ReadyWatcher::~ReadyWatcher() = default;
MockTimeSystem::MockTimeSystem() = default;
MockTimeSystem::~MockTimeSystem() = default;
MockKeyValueStoreFactory::MockKeyValueStoreFactory() {
ON_CALL(*this, createStore(_, _, _, _))
.WillByDefault(Return(ByMove(std::make_unique<MockKeyValueStore>())));
}
} // namespace Envoy