Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helpers.cpp « indexer_tests_support « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9e3b04a9e1d23f577d5533ccacfc75ab16b5bc53 (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
#include "indexer/indexer_tests_support/helpers.hpp"

#include "editor/editor_storage.hpp"

namespace indexer
{
namespace tests_support
{
void SetUpEditorForTesting(unique_ptr<osm::Editor::Delegate> delegate)
{
  auto & editor = osm::Editor::Instance();
  editor.SetDelegate(move(delegate));
  editor.SetStorageForTesting(make_unique<editor::InMemoryStorage>());
  editor.ClearAllLocalEdits();
}

void TearDownEditorForTesting()
{
  auto & editor = osm::Editor::Instance();
  editor.ClearAllLocalEdits();
  editor.SetDelegate({});
  editor.SetDefaultStorage();
}
}  // namespace tests_support
}  // namespace indexer