From aef428d8d6840395d85abb066b8118fb3e04dbc9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 18 Jan 2016 21:41:57 +0000 Subject: Remove straggling use of Slicer::Deserialize in favour of more flexible DeserializeAny --- libtmdb/testModels.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libtmdb/testModels.cpp') 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((root / "samples" / "searchMulti_breakingBad.json").string()); + auto results = Slicer::DeserializeAny((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((root / "samples" / "movie_550.json").string()); + auto movie = Slicer::DeserializeAny((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((root / "samples" / "tv_1396.json").string()); + auto tvSeries = Slicer::DeserializeAny((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); -- cgit v1.2.3