summaryrefslogtreecommitdiff
path: root/libtmdb/testModels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libtmdb/testModels.cpp')
-rw-r--r--libtmdb/testModels.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libtmdb/testModels.cpp b/libtmdb/testModels.cpp
index fac4e65..0557017 100644
--- a/libtmdb/testModels.cpp
+++ b/libtmdb/testModels.cpp
@@ -20,7 +20,7 @@ const boost::filesystem::path root(XSTR(ROOT));
BOOST_AUTO_TEST_CASE( deserialize_searchmulti_json )
{
- auto results = Slicer::Deserialize<Slicer::JsonFileDeserializer, TMDb::SearchMultiResults>((root / "samples" / "searchMulti_breakingBad.json").string());
+ auto results = Slicer::DeserializeAny<Slicer::JsonFileDeserializer, TMDb::SearchMultiResultsPtr>((root / "samples" / "searchMulti_breakingBad.json").string());
BOOST_REQUIRE_EQUAL(1, results->Page);
BOOST_REQUIRE_EQUAL(1, results->TotalPages);
BOOST_REQUIRE_EQUAL(3, results->TotalResults);
@@ -30,13 +30,13 @@ BOOST_AUTO_TEST_CASE( deserialize_searchmulti_json )
BOOST_REQUIRE_EQUAL("Breaking Bad", tv->Name);
BOOST_REQUIRE_EQUAL("/4yMXf3DW6oCL0lVPZaZM2GypgwE.jpg", tv->PosterPath);
BOOST_REQUIRE_EQUAL(1396, tv->Id);
-
+
BOOST_REQUIRE_EQUAL("::TMDb::SearchMatchMovie", results->Results[1]->ice_id());
auto movie = TMDb::SearchMatchMoviePtr::dynamicCast(results->Results[1]);
BOOST_REQUIRE_EQUAL("No Half Measures: Creating the Final Season of Breaking Bad", movie->Title);
BOOST_REQUIRE_EQUAL("/8OixSR45U5dbqv8F0tlspmTbXxN.jpg", movie->PosterPath);
BOOST_REQUIRE_EQUAL(239459, movie->Id);
-
+
BOOST_REQUIRE_EQUAL("::TMDb::SearchMatchPerson", results->Results[2]->ice_id());
auto person = TMDb::SearchMatchPersonPtr::dynamicCast(results->Results[2]);
BOOST_REQUIRE_EQUAL("Brad Pitt", person->Name);
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE( deserialize_searchmulti_json )
BOOST_AUTO_TEST_CASE( deserialize_movie_json )
{
- auto movie = Slicer::Deserialize<Slicer::JsonFileDeserializer, TMDb::Movie>((root / "samples" / "movie_550.json").string());
+ auto movie = Slicer::DeserializeAny<Slicer::JsonFileDeserializer, TMDb::MoviePtr>((root / "samples" / "movie_550.json").string());
BOOST_REQUIRE_EQUAL(550, movie->Id);
BOOST_REQUIRE_EQUAL(false, movie->Adult);
BOOST_REQUIRE_EQUAL("/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg", movie->BackdropPath);
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE( deserialize_movie_json )
BOOST_AUTO_TEST_CASE( deserialize_tvseries_json )
{
- auto tvSeries = Slicer::Deserialize<Slicer::JsonFileDeserializer, TMDb::TvSeries>((root / "samples" / "tv_1396.json").string());
+ auto tvSeries = Slicer::DeserializeAny<Slicer::JsonFileDeserializer, TMDb::TvSeriesPtr>((root / "samples" / "tv_1396.json").string());
BOOST_REQUIRE_EQUAL("/sIJyCJedGlZf1TId41gCtkblBGo.jpg", tvSeries->BackdropPath);
BOOST_REQUIRE_EQUAL(1, tvSeries->CreatedBy.size());
BOOST_REQUIRE_EQUAL(66633, tvSeries->CreatedBy.front().Id);