[partners_api] taxi engine test fix

This commit is contained in:
Arsentiy Milchakov 2017-10-13 12:53:01 +03:00 committed by Roman Kuznetsov
parent 93f05d4907
commit c9fc0f8c4e

View file

@ -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>());