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

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2017-10-23 14:37:28 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-10-23 16:03:33 +0300
commit808f111a336569c7ff83cac5e257040edf6cd9d9 (patch)
tree560e1af9664f73bdf5449fe569de9eba4e1b51b9 /partners_api/partners_api_tests
parent3142fb96b9c308cddb108d75c4b9b516a67559a2 (diff)
[partners_api] booking review fixes
Diffstat (limited to 'partners_api/partners_api_tests')
-rw-r--r--partners_api/partners_api_tests/booking_tests.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/partners_api/partners_api_tests/booking_tests.cpp b/partners_api/partners_api_tests/booking_tests.cpp
index e09b444e6c..43cc4d8bc9 100644
--- a/partners_api/partners_api_tests/booking_tests.cpp
+++ b/partners_api/partners_api_tests/booking_tests.cpp
@@ -14,6 +14,20 @@ using namespace booking::http;
namespace
{
+class AsyncGuiThreadBooking : public AsyncGuiThread
+{
+public:
+ AsyncGuiThreadBooking()
+ {
+ SetBookingUrlForTesting("http://localhost:34568/booking/min_price");
+ }
+
+ ~AsyncGuiThreadBooking() override
+ {
+ SetBookingUrlForTesting("");
+ }
+};
+
UNIT_TEST(Booking_GetHotelAvailability)
{
string const kHotelId = "98251"; // Booking hotel id for testing.
@@ -44,11 +58,8 @@ UNIT_TEST(Booking_HotelAvailability)
LOG(LINFO, (result));
}
-UNIT_CLASS_TEST(AsyncGuiThread, Booking_GetMinPrice)
+UNIT_CLASS_TEST(AsyncGuiThreadBooking, Booking_GetMinPrice)
{
- SetBookingUrlForTesting("http://localhost:34568/booking/min_price");
- MY_SCOPE_GUARD(cleanup, []() { SetBookingUrlForTesting(""); });
-
string const kHotelId = "0"; // Internal hotel id for testing.
Api api;
{
@@ -129,11 +140,8 @@ UNIT_CLASS_TEST(AsyncGuiThread, GetHotelInfo)
TEST_EQUAL(info.m_reviews.size(), 4, ());
}
-UNIT_CLASS_TEST(AsyncGuiThread, GetHotelAvailability)
+UNIT_CLASS_TEST(AsyncGuiThreadBooking, GetHotelAvailability)
{
- SetBookingUrlForTesting("http://localhost:34568/booking/min_price");
- MY_SCOPE_GUARD(cleanup, []() { SetBookingUrlForTesting(""); });
-
AvailabilityParams params;
params.m_hotelIds = {"77615", "10623"};
params.m_rooms = {"A,A"};