userver: userver/cache/statistics_mock.hpp Source File
Loading...
Searching...
No Matches
statistics_mock.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/cache/statistics_mock.hpp
4/// @brief @copybrief cache::UpdateStatisticsScopeMock
5
6#include <userver/cache/cache_statistics.hpp>
7#include <userver/cache/update_type.hpp>
8
9USERVER_NAMESPACE_BEGIN
10
11namespace cache {
12
13/// @brief Allows to test helper functions of CacheUpdateTrait::Update that use
14/// UpdateStatisticsScope
15class UpdateStatisticsScopeMock final {
16 public:
17 explicit UpdateStatisticsScopeMock(UpdateType type);
18
19 UpdateStatisticsScope& GetScope();
20
21 private:
22 impl::Statistics stats_;
23 UpdateStatisticsScope scope_;
24};
25
26} // namespace cache
27
28USERVER_NAMESPACE_END