userver: userver/storages/mongo/utest/mongo_fixture.hpp Source File
Loading...
Searching...
No Matches
mongo_fixture.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/mongo/utest/mongo_fixture.hpp
4/// @brief @copybrief storages::mongo::MongoTest
5
6#include <userver/utest/utest.hpp>
7
8#include <userver/storages/mongo/utest/mongo_local.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace storages::mongo::utest {
13
14/// Mongo fixture
15///
16/// @brief Provides access to `storages::mongo::Pool` by means
17/// `storages::mongo::utest::MongoLocal` class
18///
19/// see example: userver/samples/mongo_service/unittests
20// NOLINTNEXTLINE(fuchsia-multiple-inheritance)
21class MongoTest : public ::testing::Test, public MongoLocal {
22public:
23 MongoTest() { GetPool()->DropDatabase(); }
24};
25
26} // namespace storages::mongo::utest
27
28USERVER_NAMESPACE_END