blob: 8fbfb3e05dfa157d1180bb5c9cc77b62ba165134 (
plain)
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
38
|
#pragma once
#include "search/engine.hpp"
#include "storage/country_info_getter.hpp"
#include <memory>
#include <string>
class DataSource;
namespace search
{
struct SearchParams;
namespace tests_support
{
class TestSearchEngine
{
public:
TestSearchEngine(DataSource & dataSource, std::unique_ptr<storage::CountryInfoGetter> infoGetter,
Engine::Params const & params);
TestSearchEngine(DataSource & dataSource, Engine::Params const & params);
void SetLocale(std::string const & locale) { m_engine.SetLocale(locale); }
void LoadCitiesBoundaries() { m_engine.LoadCitiesBoundaries(); }
std::weak_ptr<search::ProcessorHandle> Search(search::SearchParams const & params);
storage::CountryInfoGetter & GetCountryInfoGetter() { return *m_infoGetter; }
private:
std::unique_ptr<storage::CountryInfoGetter> m_infoGetter;
search::Engine m_engine;
};
} // namespace tests_support
} // namespace search
|