forked from organicmaps/organicmaps
[partners_api] taxi engine test fix
This commit is contained in:
parent
93f05d4907
commit
c9fc0f8c4e
1 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,14 @@ public:
|
|||
std::string GetCityName(ms::LatLon const & latlon) override { return "Odessa"; }
|
||||
};
|
||||
|
||||
class BulgariaSofiaDelegate : public taxi::Delegate
|
||||
{
|
||||
public:
|
||||
storage::TCountriesVec GetCountryIds(ms::LatLon const & latlon) override { return {"Bulgaria"}; }
|
||||
|
||||
std::string GetCityName(ms::LatLon const & latlon) override { return "Sofia"; }
|
||||
};
|
||||
|
||||
class UsaDelegate : public taxi::Delegate
|
||||
{
|
||||
public:
|
||||
|
@ -364,6 +372,11 @@ UNIT_TEST(TaxiEngine_GetProvidersAtPos)
|
|||
engine.SetDelegate(my::make_unique<UkraineOdessaDelegate>());
|
||||
providers = engine.GetProvidersAtPos(latlon);
|
||||
TEST_EQUAL(providers.size(), 1, ());
|
||||
TEST_EQUAL(providers[0], taxi::Provider::Type::Yandex, ());
|
||||
|
||||
engine.SetDelegate(my::make_unique<BulgariaSofiaDelegate>());
|
||||
providers = engine.GetProvidersAtPos(latlon);
|
||||
TEST_EQUAL(providers.size(), 1, ());
|
||||
TEST_EQUAL(providers[0], taxi::Provider::Type::Uber, ());
|
||||
|
||||
engine.SetDelegate(my::make_unique<UsaDelegate>());
|
||||
|
|
Loading…
Add table
Reference in a new issue