#define BOOST_TEST_MODULE CallMockApi #include #include "tmdb-proxy.h" const std::string MockBase = "http://api.themoviedb.org/3"; const std::string ApiKey = "48b32823d2b60c5c1085af36daed03fa"; BOOST_AUTO_TEST_CASE( search_tmdb ) { TMDb::Proxy test(MockBase, ApiKey); auto resp = test.SearchMulti("breaking bad", 1, Ice::Current()); BOOST_REQUIRE(!resp->Results.empty()); BOOST_REQUIRE(resp->TotalResults); } BOOST_AUTO_TEST_CASE( get_movie ) { TMDb::Proxy test(MockBase, ApiKey); auto resp = test.GetMovie(550, Ice::Current()); BOOST_REQUIRE_EQUAL("Fight Club", resp->Title); }