forked from organicmaps/organicmaps
[ads] additional ads into download on map dialog are added
This commit is contained in:
parent
230557b5bf
commit
50fb05bb7f
7 changed files with 509 additions and 3 deletions
|
@ -10,6 +10,8 @@ set(
|
|||
ads/ads_engine.hpp
|
||||
ads/ads_utils.cpp
|
||||
ads/ads_utils.hpp
|
||||
ads/arsenal_ads.cpp
|
||||
ads/arsenal_ads.hpp
|
||||
ads/banner.hpp
|
||||
ads/bookmark_catalog_ads.cpp
|
||||
ads/bookmark_catalog_ads.hpp
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "partners_api/ads/ads_engine.hpp"
|
||||
|
||||
#include "partners_api/ads/arsenal_ads.hpp"
|
||||
#include "partners_api/ads/bookmark_catalog_ads.hpp"
|
||||
#include "partners_api/ads/citymobil_ads.hpp"
|
||||
#include "partners_api/ads/facebook_ads.hpp"
|
||||
#include "partners_api/ads/mastercard_sber_ads.hpp"
|
||||
#include "partners_api/ads/mopub_ads.hpp"
|
||||
#include "partners_api/ads/rb_ads.hpp"
|
||||
|
||||
|
@ -50,8 +50,16 @@ Engine::Engine(std::unique_ptr<Delegate> delegate)
|
|||
|
||||
m_searchBanners.emplace_back(Banner::Type::Facebook, std::make_unique<FacebookSearch>());
|
||||
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::MastercardSberbank,
|
||||
std::make_unique<MastercardSberbank>(*m_delegate));
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::ArsenalMedic,
|
||||
std::make_unique<ArsenalMedic>(*m_delegate));
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::ArsenalFlat,
|
||||
std::make_unique<ArsenalFlat>(*m_delegate));
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::ArsenalInsuranceCrimea,
|
||||
std::make_unique<ArsenalInsuranceCrimea>(*m_delegate));
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::ArsenalInsuranceRussia,
|
||||
std::make_unique<ArsenalInsuranceRussia>(*m_delegate));
|
||||
m_downloadOnMapBanners.emplace_back(Banner::Type::ArsenalInsuranceWorld,
|
||||
std::make_unique<ArsenalInsuranceWorld>(*m_delegate));
|
||||
m_downloadOnMapPromo.emplace_back(Banner::Type::BookmarkCatalog,
|
||||
std::make_unique<BookmarkCatalog>(*m_delegate));
|
||||
m_searchCategoryBanners.emplace_back(Banner::Type::Citymobil,
|
||||
|
|
208
partners_api/ads/arsenal_ads.cpp
Normal file
208
partners_api/ads/arsenal_ads.cpp
Normal file
|
@ -0,0 +1,208 @@
|
|||
#include "partners_api/ads/arsenal_ads.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
std::initializer_list<std::string> const kSupportedLanguages = {"ru"};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedCountriesMedic = {
|
||||
"Russia_Moscow",
|
||||
"Russia_Saint Petersburg"
|
||||
};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedCountriesFlat = {
|
||||
"United States of America",
|
||||
"Greece",
|
||||
"Mexico",
|
||||
"Cuba",
|
||||
"Tunisia",
|
||||
"Jordan",
|
||||
"Brazil",
|
||||
"Tanzania",
|
||||
"Morocco",
|
||||
"Macedonia",
|
||||
"Andorra",
|
||||
"Haiti",
|
||||
"Egypt",
|
||||
"Maldives",
|
||||
"Kenya",
|
||||
"Dominican Republic",
|
||||
"Russia_Moscow Oblast_East",
|
||||
"Russia_Moscow Oblast_West",
|
||||
"Russia_Rostov Oblast",
|
||||
"Russia_Tatarstan",
|
||||
"Russia_Sverdlovsk Oblast_Ekaterinburg",
|
||||
"Russia_Voronezh Oblast",
|
||||
"Russia_Tver Oblast",
|
||||
"Russia_Tula Oblast",
|
||||
"Russia_Bashkortostan",
|
||||
"Russia_Smolensk Oblast",
|
||||
"Russia_Samara Oblast",
|
||||
"Russia_Nizhny Novgorod Oblast",
|
||||
"Russia_Chelyabinsk Oblast",
|
||||
"Russia_Vladimir Oblast",
|
||||
"Russia_Novosibirsk Oblast",
|
||||
"Russia_Pskov Oblast",
|
||||
"Russia_Kaluga Oblast",
|
||||
"Russia_Yaroslavl Oblast",
|
||||
"Russia_Lipetsk Oblast",
|
||||
"Russia_Novgorod Oblast",
|
||||
"Russia_Volgograd Oblast",
|
||||
"Russia_Perm Krai_South",
|
||||
"Russia_Saratov Oblast",
|
||||
"Russia_Krasnoyarsk Krai_South",
|
||||
"Russia_Ryazan Oblast",
|
||||
"Russia_Bryansk Oblast",
|
||||
"Russia_Ulyanovsk Oblast",
|
||||
"Russia_Kursk Oblast",
|
||||
"Russia_Orenburg Oblast",
|
||||
"Russia_Belgorod Oblast",
|
||||
"Russia_Vologda Oblast",
|
||||
"Russia_Tyumen Oblast",
|
||||
"Russia_Oryol Oblast",
|
||||
"Russia_Yugra_Surgut",
|
||||
"Russia_Murmansk Oblast",
|
||||
"Russia_Omsk Oblast",
|
||||
"Russia_Sverdlovsk Oblast_North",
|
||||
"Russia_Khabarovsk Krai",
|
||||
"Russia_Udmurt Republic",
|
||||
"Russia_Chuvashia",
|
||||
"Russia_Penza Oblast",
|
||||
"Russia_Tambov Oblast",
|
||||
"Russia_Arkhangelsk Oblast_Central",
|
||||
"Russia_Ivanovo Oblast",
|
||||
"Russia_Kirov Oblast",
|
||||
"Russia_Kostroma Oblast",
|
||||
"Russia_Republic of Kalmykia",
|
||||
"Russia_Tomsk Oblast",
|
||||
"Russia_Kurgan Oblast",
|
||||
"Russia_Republic of Mordovia",
|
||||
"Russia_Mari El",
|
||||
"Russia_Perm Krai_North",
|
||||
"Russia_Komi Republic",
|
||||
"Russia_Yugra_Khanty",
|
||||
"Russia_Yamalo-Nenets Autonomous Okrug",
|
||||
"Russia_Sakha Republic",
|
||||
"Russia_Amur Oblast",
|
||||
"Russia_Zabaykalsky Krai",
|
||||
"Russia_Khakassia",
|
||||
"Russia_Arkhangelsk Oblast_North",
|
||||
"Russia_Krasnoyarsk Krai_North",
|
||||
"Russia_Jewish Autonomous Oblast",
|
||||
"Russia_Magadan Oblast",
|
||||
"Russia_Nenets Autonomous Okrug",
|
||||
"Russia_Tuva"
|
||||
};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedCountriesCrimea = {"Crimea"};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedCountriesRussia = {
|
||||
"Russia_Krasnodar Krai",
|
||||
"Russia_Krasnodar Krai_Adygeya",
|
||||
"Russia_Leningradskaya Oblast_Karelsky",
|
||||
"Russia_Leningradskaya Oblast_Southeast",
|
||||
"Russia_Kaliningrad Oblast",
|
||||
"Russia_Stavropol Krai",
|
||||
"Russia_Republic of Karelia_South",
|
||||
"Russia_Primorsky Krai",
|
||||
"Russia_Kabardino-Balkaria",
|
||||
"Russia_North Ossetia-Alania",
|
||||
"Russia_Irkutsk Oblast",
|
||||
"Russia_Kemerov Oblast",
|
||||
"Russia_Karachay-Cherkessia",
|
||||
"Russia_Republic of Dagestan",
|
||||
"Russia_Astrakhan Oblast",
|
||||
"Russia_Republic of Karelia_North",
|
||||
"Russia_Buryatia",
|
||||
"Russia_Altai Republic",
|
||||
"Russia_Sakhalin Oblast",
|
||||
"Russia_Ingushetia",
|
||||
"Russia_Chechen Republic",
|
||||
"Russia_Kamchatka Krai",
|
||||
"Russia_Chukotka Autonomous Okrug"
|
||||
};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedCountriesWorld = {
|
||||
"Ukraine",
|
||||
"Belarus",
|
||||
"Turkey",
|
||||
"Kazakhstan",
|
||||
"Abkhazia",
|
||||
"Croatia",
|
||||
"Bosnia and Herzegovina",
|
||||
"Slovenia",
|
||||
"Moldova",
|
||||
"Serbia",
|
||||
"United Arab Emirates",
|
||||
"Albania",
|
||||
"Montenegro",
|
||||
"Uzbekistan"
|
||||
};
|
||||
|
||||
std::initializer_list<storage::CountryId> const kSupportedUserPosCountriesRussia = {"Russian Federation"};
|
||||
std::initializer_list<storage::CountryId> const kExcludedUserPosCountriesRussia = {"Russian Federation"};
|
||||
} // namespace
|
||||
|
||||
namespace ads
|
||||
{
|
||||
ArsenalMedic::ArsenalMedic(Delegate & delegate)
|
||||
: DownloadOnMapContainer(delegate)
|
||||
{
|
||||
AppendSupportedUserLanguages(kSupportedLanguages);
|
||||
AppendSupportedCountries(kSupportedCountriesMedic);
|
||||
}
|
||||
|
||||
std::string ArsenalMedic::GetBannerInternal() const
|
||||
{
|
||||
return "https://arsenalins.ru/store/telemed.php?utm=maps_me_direct";
|
||||
}
|
||||
|
||||
ArsenalFlat::ArsenalFlat(Delegate & delegate)
|
||||
: DownloadOnMapContainer(delegate)
|
||||
{
|
||||
AppendSupportedUserLanguages(kSupportedLanguages);
|
||||
AppendSupportedCountries(kSupportedCountriesFlat);
|
||||
}
|
||||
|
||||
std::string ArsenalFlat::GetBannerInternal() const
|
||||
{
|
||||
return "https://arsenalins.ru/store/kvartiri.php?utm=maps_me_direct";
|
||||
}
|
||||
|
||||
ArsenalInsuranceCrimea::ArsenalInsuranceCrimea(Delegate & delegate)
|
||||
: DownloadOnMapContainer(delegate)
|
||||
{
|
||||
AppendSupportedUserLanguages(kSupportedLanguages);
|
||||
AppendSupportedCountries(kSupportedCountriesCrimea);
|
||||
}
|
||||
|
||||
std::string ArsenalInsuranceCrimea::GetBannerInternal() const
|
||||
{
|
||||
return "https://arsenalins.ru/store/crimea.php?utm=maps_me_direct";
|
||||
}
|
||||
|
||||
ArsenalInsuranceRussia::ArsenalInsuranceRussia(Delegate & delegate)
|
||||
: DownloadOnMapContainer(delegate)
|
||||
{
|
||||
AppendSupportedUserLanguages(kSupportedLanguages);
|
||||
AppendSupportedCountries(kSupportedCountriesRussia);
|
||||
AppendSupportedUserPosCountries(kSupportedUserPosCountriesRussia);
|
||||
}
|
||||
|
||||
std::string ArsenalInsuranceRussia::GetBannerInternal() const
|
||||
{
|
||||
return "https://arsenalins.ru/store/?utm=maps_me_direct&country=rus";
|
||||
}
|
||||
|
||||
ArsenalInsuranceWorld::ArsenalInsuranceWorld(Delegate & delegate)
|
||||
: DownloadOnMapContainer(delegate)
|
||||
{
|
||||
AppendSupportedUserLanguages(kSupportedLanguages);
|
||||
AppendSupportedCountries(kSupportedCountriesWorld);
|
||||
AppendExcludedUserPosCountries(kExcludedUserPosCountriesRussia);
|
||||
}
|
||||
|
||||
std::string ArsenalInsuranceWorld::GetBannerInternal() const
|
||||
{
|
||||
return "https://arsenalins.ru/store/?utm=maps_me_direct&country=not_rus";
|
||||
}
|
||||
} // namespace ads
|
52
partners_api/ads/arsenal_ads.hpp
Normal file
52
partners_api/ads/arsenal_ads.hpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
#pragma once
|
||||
|
||||
#include "partners_api/ads/ads_base.hpp"
|
||||
|
||||
namespace ads
|
||||
{
|
||||
class ArsenalMedic : public DownloadOnMapContainer
|
||||
{
|
||||
public:
|
||||
explicit ArsenalMedic(Delegate & delegate);
|
||||
|
||||
private:
|
||||
std::string GetBannerInternal() const override;
|
||||
};
|
||||
|
||||
class ArsenalFlat : public DownloadOnMapContainer
|
||||
{
|
||||
public:
|
||||
explicit ArsenalFlat(Delegate & delegate);
|
||||
|
||||
private:
|
||||
std::string GetBannerInternal() const override;
|
||||
};
|
||||
|
||||
class ArsenalInsuranceCrimea : public DownloadOnMapContainer
|
||||
{
|
||||
public:
|
||||
explicit ArsenalInsuranceCrimea(Delegate & delegate);
|
||||
|
||||
private:
|
||||
std::string GetBannerInternal() const override;
|
||||
};
|
||||
|
||||
class ArsenalInsuranceRussia : public DownloadOnMapContainer
|
||||
{
|
||||
public:
|
||||
explicit ArsenalInsuranceRussia(Delegate & delegate);
|
||||
|
||||
private:
|
||||
std::string GetBannerInternal() const override;
|
||||
};
|
||||
|
||||
class ArsenalInsuranceWorld : public DownloadOnMapContainer
|
||||
{
|
||||
public:
|
||||
explicit ArsenalInsuranceWorld(Delegate & delegate);
|
||||
|
||||
private:
|
||||
std::string GetBannerInternal() const override;
|
||||
};
|
||||
} // namespace ads
|
||||
|
|
@ -29,6 +29,11 @@ struct Banner
|
|||
BookmarkCatalog = 8,
|
||||
MastercardSberbank = 9,
|
||||
Citymobil = 10,
|
||||
ArsenalMedic = 11,
|
||||
ArsenalFlat = 12,
|
||||
ArsenalInsuranceCrimea = 13,
|
||||
ArsenalInsuranceRussia = 14,
|
||||
ArsenalInsuranceWorld = 15,
|
||||
};
|
||||
|
||||
Banner() = default;
|
||||
|
@ -53,6 +58,11 @@ inline std::string DebugPrint(Banner::Type type)
|
|||
case Banner::Type::BookmarkCatalog: return "BookmarkCatalog";
|
||||
case Banner::Type::MastercardSberbank: return "MastercardSberbank";
|
||||
case Banner::Type::Citymobil: return "Citymobil";
|
||||
case Banner::Type::ArsenalMedic: return "ArsenalMedic";
|
||||
case Banner::Type::ArsenalFlat: return "ArsenalFlat";
|
||||
case Banner::Type::ArsenalInsuranceCrimea: return "ArsenalInsuranceCrimea";
|
||||
case Banner::Type::ArsenalInsuranceRussia: return "ArsenalInsuranceRussia";
|
||||
case Banner::Type::ArsenalInsuranceWorld: return "ArsenalInsuranceWorld";
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ add_definitions(-DOMIM_UNIT_TEST_WITH_QT_EVENT_LOOP)
|
|||
set(
|
||||
SRC
|
||||
ads_engine_tests.cpp
|
||||
arsenal_tests.cpp
|
||||
booking_tests.cpp
|
||||
bookmark_catalog_ads_tests.cpp
|
||||
citymobil_tests.cpp
|
||||
|
|
225
partners_api/partners_api_tests/arsenal_tests.cpp
Normal file
225
partners_api/partners_api_tests/arsenal_tests.cpp
Normal file
|
@ -0,0 +1,225 @@
|
|||
#include "testing/testing.hpp"
|
||||
|
||||
#include "partners_api/ads/arsenal_ads.hpp"
|
||||
|
||||
#include "partners_api/partners_api_tests/download_on_map_container_delegate.hpp"
|
||||
|
||||
UNIT_TEST(ArsenalMedic)
|
||||
{
|
||||
DownloadOnMapContainerDelegateForTesting delegate;
|
||||
ads::ArsenalMedic arsenalMedic(delegate);
|
||||
m2::PointD point;
|
||||
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow Oblast_East", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow Oblast_East", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow Oblast_East", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalMedic.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
}
|
||||
|
||||
UNIT_TEST(ArsenalFlat)
|
||||
{
|
||||
DownloadOnMapContainerDelegateForTesting delegate;
|
||||
ads::ArsenalFlat arsenalFlat(delegate);
|
||||
m2::PointD point;
|
||||
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalFlat.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalFlat.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalFlat.GetBanner("Russia_Moscow", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalFlat.GetBanner("US_Pennsylvania_Central", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("United States of America");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalFlat.GetBanner("US_Pennsylvania_Central", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("United States of America");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalFlat.GetBanner("US_Pennsylvania_Central", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
}
|
||||
|
||||
UNIT_TEST(ArsenalInsuranceCrimea)
|
||||
{
|
||||
DownloadOnMapContainerDelegateForTesting delegate;
|
||||
ads::ArsenalInsuranceCrimea arsenalInsuranceCrimea(delegate);
|
||||
m2::PointD point;
|
||||
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Russia_Moscow", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Crimea", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Crimea", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalInsuranceCrimea.GetBanner("Crimea", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
}
|
||||
|
||||
UNIT_TEST(ArsenalInsuranceRussia)
|
||||
{
|
||||
DownloadOnMapContainerDelegateForTesting delegate;
|
||||
ads::ArsenalInsuranceRussia ArsenalInsuranceRussia(delegate);
|
||||
m2::PointD point;
|
||||
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Moscow", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Krasnodar Krai_Adygeya", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Krasnodar Krai_Adygeya", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = ArsenalInsuranceRussia.GetBanner("Russia_Krasnodar Krai_Adygeya", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
}
|
||||
|
||||
UNIT_TEST(ArsenalInsuranceWorld)
|
||||
{
|
||||
DownloadOnMapContainerDelegateForTesting delegate;
|
||||
ads::ArsenalInsuranceWorld arsenalInsuranceWorld(delegate);
|
||||
m2::PointD point;
|
||||
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Russia_Moscow", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Russia_Moscow", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Cote dIvoire");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Russia_Krasnodar Krai_Adygeya", point, "en");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Russian Federation");
|
||||
delegate.SetCountryId("Russian Federation");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Slovenia", point, "ru");
|
||||
TEST(banner.empty(), ());
|
||||
}
|
||||
{
|
||||
delegate.SetTopmostParent("Slovenia");
|
||||
delegate.SetCountryId("Cote dIvoire");
|
||||
auto const banner = arsenalInsuranceWorld.GetBanner("Slovenia", point, "ru");
|
||||
TEST(!banner.empty(), ());
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue