diff --git a/src/main/java/com/omertron/themoviedbapi/Compare.java b/src/main/java/com/omertron/themoviedbapi/Compare.java index 8719734dc..38debfa28 100644 --- a/src/main/java/com/omertron/themoviedbapi/Compare.java +++ b/src/main/java/com/omertron/themoviedbapi/Compare.java @@ -19,7 +19,7 @@ */ package com.omertron.themoviedbapi; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import org.apache.commons.lang3.StringUtils; /** @@ -46,7 +46,7 @@ public class Compare { * @param year The year of the movie to compare exact match * @return True if there is a match, False otherwise. */ - public static boolean movies(final MovieDb moviedb, final String title, final String year) { + public static boolean movies(final MovieInfo moviedb, final String title, final String year) { return movies(moviedb, title, year, 0, true); } @@ -61,7 +61,7 @@ public class Compare { * @param caseSensitive true if the comparison is to be case sensitive * @return True if there is a match, False otherwise. */ - public static boolean movies(final MovieDb moviedb, final String title, final String year, int maxDistance, boolean caseSensitive) { + public static boolean movies(final MovieInfo moviedb, final String title, final String year, int maxDistance, boolean caseSensitive) { if ((moviedb == null) || (StringUtils.isBlank(title))) { return false; } @@ -115,7 +115,7 @@ public class Compare { * @param maxDistance * @return */ - public static boolean movies(final MovieDb moviedb, final String title, final String year, int maxDistance) { + public static boolean movies(final MovieInfo moviedb, final String title, final String year, int maxDistance) { return Compare.movies(moviedb, title, year, maxDistance, true); } diff --git a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java index b5a0d1a06..7eef96e7a 100644 --- a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java +++ b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java @@ -66,7 +66,7 @@ import com.omertron.themoviedbapi.model.media.MediaCreditList; import com.omertron.themoviedbapi.model.media.MediaState; import com.omertron.themoviedbapi.model.media.AlternativeTitle; import com.omertron.themoviedbapi.model.movie.MovieBasic; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.movie.ReleaseInfo; import com.omertron.themoviedbapi.model.media.Translation; import com.omertron.themoviedbapi.model.media.Video; @@ -92,7 +92,7 @@ import org.apache.http.client.HttpClient; import org.yamj.api.common.http.SimpleHttpClientBuilder; /** - * The MovieDb API + * The MovieInfo API *

* This is for version 3 of the API as specified here: * http://help.themoviedb.org/kb/api/about-3 @@ -749,7 +749,7 @@ public class TheMovieDbApi { * @return The list and its items * @throws MovieDbException */ - public ListItem getList(String listId) throws MovieDbException { + public ListItem getList(String listId) throws MovieDbException { return tmdbList.getList(listId); } @@ -837,7 +837,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public MovieDb getMovieInfo(int movieId, String language, String... appendToResponse) throws MovieDbException { + public MovieInfo getMovieInfo(int movieId, String language, String... appendToResponse) throws MovieDbException { return tmdbMovies.getMovieInfo(movieId, language, appendToResponse); } @@ -855,7 +855,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public MovieDb getMovieInfoImdb(String imdbId, String language, String... appendToResponse) throws MovieDbException { + public MovieInfo getMovieInfoImdb(String imdbId, String language, String... appendToResponse) throws MovieDbException { return tmdbMovies.getMovieInfoImdb(imdbId, language, appendToResponse); } @@ -988,7 +988,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException { + public TmdbResultsList getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException { return tmdbMovies.getSimilarMovies(movieId, page, language, appendToResponse); } @@ -1064,7 +1064,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public MovieDb getLatestMovie() throws MovieDbException { + public MovieInfo getLatestMovie() throws MovieDbException { return tmdbMovies.getLatestMovie(); } @@ -1080,7 +1080,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList getUpcoming(Integer page, String language) throws MovieDbException { + public TmdbResultsList getUpcoming(Integer page, String language) throws MovieDbException { return tmdbMovies.getUpcoming(page, language); } @@ -1095,7 +1095,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList getNowPlayingMovies(Integer page, String language) throws MovieDbException { + public TmdbResultsList getNowPlayingMovies(Integer page, String language) throws MovieDbException { return tmdbMovies.getNowPlayingMovies(page, language); } @@ -1109,7 +1109,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList getPopularMovieList(Integer page, String language) throws MovieDbException { + public TmdbResultsList getPopularMovieList(Integer page, String language) throws MovieDbException { return tmdbMovies.getPopularMovieList(page, language); } @@ -1124,7 +1124,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList getTopRatedMovies(Integer page, String language) throws MovieDbException { + public TmdbResultsList getTopRatedMovies(Integer page, String language) throws MovieDbException { return tmdbMovies.getTopRatedMovies(page, language); } // @@ -1375,7 +1375,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public TmdbResultsList searchMovie(String query, + public TmdbResultsList searchMovie(String query, Integer page, String language, Boolean includeAdult, diff --git a/src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java b/src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java index 7766c4630..640829b02 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java @@ -30,7 +30,7 @@ import com.omertron.themoviedbapi.model.keyword.Keyword; import com.omertron.themoviedbapi.model.list.UserList; import com.omertron.themoviedbapi.model.media.AlternativeTitle; import com.omertron.themoviedbapi.model.movie.MovieBasic; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.person.ContentRating; import com.omertron.themoviedbapi.model.person.Person; import com.omertron.themoviedbapi.model.person.PersonFind; @@ -74,7 +74,7 @@ public class AbstractMethod { }); TYPE_REFS.put(Keyword.class, new TypeReference>() { }); - TYPE_REFS.put(MovieDb.class, new TypeReference>() { + TYPE_REFS.put(MovieInfo.class, new TypeReference>() { }); TYPE_REFS.put(Person.class, new TypeReference>() { }); diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java index 9d316351c..ea3a07af2 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java @@ -25,7 +25,7 @@ import com.omertron.themoviedbapi.model.list.ListStatusCode; import com.omertron.themoviedbapi.model.StatusCode; import com.omertron.themoviedbapi.model.list.ListItem; import com.omertron.themoviedbapi.model.list.ListItemStatus; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.tools.ApiUrl; import com.omertron.themoviedbapi.tools.HttpTools; import com.omertron.themoviedbapi.tools.MethodBase; @@ -63,7 +63,7 @@ public class TmdbLists extends AbstractMethod { * @return The list and its items * @throws MovieDbException */ - public ListItem getList(String listId) throws MovieDbException { + public ListItem getList(String listId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, listId); @@ -71,7 +71,7 @@ public class TmdbLists extends AbstractMethod { String webpage = httpTools.getRequest(url); try { - return MAPPER.readValue(webpage, new TypeReference>() { + return MAPPER.readValue(webpage, new TypeReference>() { }); } catch (IOException ex) { throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get list", url, ex); diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java index cd4cd38e2..52a28b8e2 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java @@ -28,7 +28,7 @@ import com.omertron.themoviedbapi.model.list.UserList; import com.omertron.themoviedbapi.model.media.MediaCreditList; import com.omertron.themoviedbapi.model.media.MediaState; import com.omertron.themoviedbapi.model.media.AlternativeTitle; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.movie.ReleaseInfo; import com.omertron.themoviedbapi.model.media.Translation; import com.omertron.themoviedbapi.model.media.Video; @@ -87,7 +87,7 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public MovieDb getMovieInfo(int movieId, String language, String... appendToResponse) throws MovieDbException { + public MovieInfo getMovieInfo(int movieId, String language, String... appendToResponse) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); parameters.add(Param.LANGUAGE, language); @@ -96,7 +96,7 @@ public class TmdbMovies extends AbstractMethod { URL url = new ApiUrl(apiKey, MethodBase.MOVIE).buildUrl(parameters); String webpage = httpTools.getRequest(url); try { - MovieDb movie = MAPPER.readValue(webpage, MovieDb.class); + MovieInfo movie = MAPPER.readValue(webpage, MovieInfo.class); if (movie == null || movie.getId() == 0) { throw new MovieDbException(ApiExceptionType.ID_NOT_FOUND, "No movie found for ID: " + movieId, url); } @@ -120,7 +120,7 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public MovieDb getMovieInfoImdb(String imdbId, String language, String... appendToResponse) throws MovieDbException { + public MovieInfo getMovieInfoImdb(String imdbId, String language, String... appendToResponse) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, imdbId); parameters.add(Param.LANGUAGE, language); @@ -130,7 +130,7 @@ public class TmdbMovies extends AbstractMethod { String webpage = httpTools.getRequest(url); try { - MovieDb movie = MAPPER.readValue(webpage, MovieDb.class); + MovieInfo movie = MAPPER.readValue(webpage, MovieInfo.class); if (movie == null || movie.getId() == 0) { throw new MovieDbException(ApiExceptionType.ID_NOT_FOUND, "No movie found for IMDB ID: " + imdbId, url); } @@ -377,7 +377,7 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException { + public TmdbResultsList getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); parameters.add(Param.LANGUAGE, language); @@ -385,7 +385,7 @@ public class TmdbMovies extends AbstractMethod { parameters.add(Param.APPEND, appendToResponse); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.SIMILAR).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "similar movies"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "similar movies"); return wrapper.getTmdbResultsList(); } @@ -509,12 +509,12 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public MovieDb getLatestMovie() throws MovieDbException { + public MovieInfo getLatestMovie() throws MovieDbException { URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.LATEST).buildUrl(); String webpage = httpTools.getRequest(url); try { - return MAPPER.readValue(webpage, MovieDb.class); + return MAPPER.readValue(webpage, MovieInfo.class); } catch (IOException ex) { throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get latest movie", url, ex); } @@ -532,13 +532,13 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList getUpcoming(Integer page, String language) throws MovieDbException { + public TmdbResultsList getUpcoming(Integer page, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.LANGUAGE, language); parameters.add(Param.PAGE, page); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.UPCOMING).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "upcoming movies"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "upcoming movies"); return wrapper.getTmdbResultsList(); } @@ -553,13 +553,13 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList getNowPlayingMovies(Integer page, String language) throws MovieDbException { + public TmdbResultsList getNowPlayingMovies(Integer page, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.LANGUAGE, language); parameters.add(Param.PAGE, page); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.NOW_PLAYING).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "now playing movies"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "now playing movies"); return wrapper.getTmdbResultsList(); } @@ -573,13 +573,13 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList getPopularMovieList(Integer page, String language) throws MovieDbException { + public TmdbResultsList getPopularMovieList(Integer page, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.LANGUAGE, language); parameters.add(Param.PAGE, page); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.POPULAR).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "popular movie list"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "popular movie list"); return wrapper.getTmdbResultsList(); } @@ -594,13 +594,13 @@ public class TmdbMovies extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList getTopRatedMovies(Integer page, String language) throws MovieDbException { + public TmdbResultsList getTopRatedMovies(Integer page, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.LANGUAGE, language); parameters.add(Param.PAGE, page); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.TOP_RATED).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "top rated movies"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "top rated movies"); return wrapper.getTmdbResultsList(); } diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java index fd7319db5..cba266aa1 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java @@ -27,7 +27,7 @@ import com.omertron.themoviedbapi.model.company.Company; import com.omertron.themoviedbapi.model.keyword.Keyword; import com.omertron.themoviedbapi.model.list.UserList; import com.omertron.themoviedbapi.model.media.MediaBasic; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.person.PersonFind; import com.omertron.themoviedbapi.model.tv.TVBasic; import com.omertron.themoviedbapi.results.TmdbResultsList; @@ -154,7 +154,7 @@ public class TmdbSearch extends AbstractMethod { * @return * @throws MovieDbException */ - public TmdbResultsList searchMovie(String query, + public TmdbResultsList searchMovie(String query, Integer page, String language, Boolean includeAdult, @@ -173,7 +173,7 @@ public class TmdbSearch extends AbstractMethod { } URL url = new ApiUrl(apiKey, MethodBase.SEARCH).subMethod(MethodSub.MOVIE).buildUrl(parameters); - WrapperGenericList wrapper = processWrapper(getTypeReference(MovieDb.class), url, "movie"); + WrapperGenericList wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "movie"); return wrapper.getTmdbResultsList(); } diff --git a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieDb.java b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java similarity index 97% rename from src/main/java/com/omertron/themoviedbapi/model/movie/MovieDb.java rename to src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java index 1de8e9b95..3701d25b8 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieDb.java +++ b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java @@ -51,7 +51,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; * * @author stuart.boston */ -public class MovieDb extends AbstractJsonMapping { +public class MovieInfo extends AbstractJsonMapping { private static final long serialVersionUID = 1L; @JsonProperty("backdrop_path") @@ -119,7 +119,7 @@ public class MovieDb extends AbstractJsonMapping { private WrapperVideos trailers; @JsonProperty("translations") private WrapperTranslations translations; - private List similarMovies; + private List similarMovies; private List reviews; private List lists; @JsonProperty("video") @@ -370,7 +370,7 @@ public class MovieDb extends AbstractJsonMapping { return translations.getTranslations(); } - public List getSimilarMovies() { + public List getSimilarMovies() { return similarMovies; } @@ -413,7 +413,7 @@ public class MovieDb extends AbstractJsonMapping { } @JsonSetter("similar_movies") - public void setSimilarMovies(WrapperGenericList similarMovies) { + public void setSimilarMovies(WrapperGenericList similarMovies) { this.similarMovies = similarMovies.getResults(); } @@ -431,8 +431,8 @@ public class MovieDb extends AbstractJsonMapping { // @Override public boolean equals(Object obj) { - if (obj instanceof MovieDb) { - final MovieDb other = (MovieDb) obj; + if (obj instanceof MovieInfo) { + final MovieInfo other = (MovieInfo) obj; return new EqualsBuilder() .append(id, other.id) .append(imdbID, other.imdbID) diff --git a/src/test/java/com/omertron/themoviedbapi/CompareTest.java b/src/test/java/com/omertron/themoviedbapi/CompareTest.java index 68b75a97b..b169c1adc 100644 --- a/src/test/java/com/omertron/themoviedbapi/CompareTest.java +++ b/src/test/java/com/omertron/themoviedbapi/CompareTest.java @@ -5,7 +5,7 @@ */ package com.omertron.themoviedbapi; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import org.apache.commons.lang3.StringUtils; import org.junit.After; import org.junit.AfterClass; @@ -24,7 +24,7 @@ public class CompareTest { private static final Logger LOG = LoggerFactory.getLogger(CompareTest.class); - private static MovieDb moviedb; + private static MovieInfo moviedb; private static final String TITLE_MAIN = "Blade Runner"; private static final String TITLE_OTHER = "Blade Runner Directors Cut"; private static final String YEAR_FULL = "1982-01-01"; @@ -41,7 +41,7 @@ public class CompareTest { TestLogger.Configure(); // Set the default comparison movie - moviedb = new MovieDb(); + moviedb = new MovieInfo(); moviedb.setTitle(TITLE_MAIN); moviedb.setOriginalTitle(TITLE_OTHER); moviedb.setReleaseDate(YEAR_FULL); diff --git a/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java b/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java index 737f4baa8..ea741180a 100644 --- a/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java +++ b/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java @@ -36,7 +36,7 @@ import com.omertron.themoviedbapi.model.media.MediaCreditCast; import com.omertron.themoviedbapi.model.media.MediaCreditList; import com.omertron.themoviedbapi.model.media.MediaState; import com.omertron.themoviedbapi.model.media.AlternativeTitle; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.movie.ReleaseInfo; import com.omertron.themoviedbapi.model.media.Translation; import com.omertron.themoviedbapi.model.media.Video; @@ -94,7 +94,7 @@ public class TmdbMoviesTest extends AbstractTests { String[] appendToResponse = null; for (TestID test : FILM_IDS) { - MovieDb result = instance.getMovieInfo(test.getTmdb(), language, appendToResponse); + MovieInfo result = instance.getMovieInfo(test.getTmdb(), language, appendToResponse); assertEquals("Wrong IMDB ID", test.getImdb(), result.getImdbID()); assertEquals("Wrong title", test.getName(), result.getTitle()); @@ -113,7 +113,7 @@ public class TmdbMoviesTest extends AbstractTests { String[] appendToResponse = null; for (TestID test : FILM_IDS) { - MovieDb result = instance.getMovieInfoImdb(test.getImdb(), language, appendToResponse); + MovieInfo result = instance.getMovieInfoImdb(test.getImdb(), language, appendToResponse); assertEquals("Wrong TMDB ID", test.getTmdb(), result.getId()); assertEquals("Wrong title", test.getName(), result.getTitle()); } @@ -295,7 +295,7 @@ public class TmdbMoviesTest extends AbstractTests { String[] appendToResponse = null; for (TestID test : FILM_IDS) { - TmdbResultsList result = instance.getSimilarMovies(test.getTmdb(), page, language, appendToResponse); + TmdbResultsList result = instance.getSimilarMovies(test.getTmdb(), page, language, appendToResponse); assertFalse("No similar movies", result.isEmpty()); } } @@ -399,7 +399,7 @@ public class TmdbMoviesTest extends AbstractTests { public void testGetLatestMovie() throws MovieDbException { LOG.info("getLatestMovie"); - MovieDb result = instance.getLatestMovie(); + MovieInfo result = instance.getLatestMovie(); assertNotNull("Null movie returned", result); assertTrue("No ID", result.getId() > 0); assertTrue("No title", StringUtils.isNotBlank(result.getTitle())); @@ -416,7 +416,7 @@ public class TmdbMoviesTest extends AbstractTests { Integer page = null; String language = LANGUAGE_DEFAULT; - TmdbResultsList result = instance.getUpcoming(page, language); + TmdbResultsList result = instance.getUpcoming(page, language); assertFalse("No results found", result.isEmpty()); } @@ -431,7 +431,7 @@ public class TmdbMoviesTest extends AbstractTests { Integer page = null; String language = LANGUAGE_DEFAULT; - TmdbResultsList result = instance.getNowPlayingMovies(page, language); + TmdbResultsList result = instance.getNowPlayingMovies(page, language); assertFalse("No results found", result.isEmpty()); } @@ -446,7 +446,7 @@ public class TmdbMoviesTest extends AbstractTests { Integer page = null; String language = LANGUAGE_DEFAULT; - TmdbResultsList result = instance.getPopularMovieList(page, language); + TmdbResultsList result = instance.getPopularMovieList(page, language); assertFalse("No results found", result.isEmpty()); } @@ -461,7 +461,7 @@ public class TmdbMoviesTest extends AbstractTests { Integer page = null; String language = LANGUAGE_DEFAULT; - TmdbResultsList result = instance.getTopRatedMovies(page, language); + TmdbResultsList result = instance.getTopRatedMovies(page, language); assertFalse("No results found", result.isEmpty()); } diff --git a/src/test/java/com/omertron/themoviedbapi/methods/TmdbSearchTest.java b/src/test/java/com/omertron/themoviedbapi/methods/TmdbSearchTest.java index 27ac12cda..0eb5a7706 100644 --- a/src/test/java/com/omertron/themoviedbapi/methods/TmdbSearchTest.java +++ b/src/test/java/com/omertron/themoviedbapi/methods/TmdbSearchTest.java @@ -27,7 +27,7 @@ import com.omertron.themoviedbapi.model.company.Company; import com.omertron.themoviedbapi.model.keyword.Keyword; import com.omertron.themoviedbapi.model.list.UserList; import com.omertron.themoviedbapi.model.media.MediaBasic; -import com.omertron.themoviedbapi.model.movie.MovieDb; +import com.omertron.themoviedbapi.model.movie.MovieInfo; import com.omertron.themoviedbapi.model.person.PersonFind; import com.omertron.themoviedbapi.model.tv.TVBasic; import com.omertron.themoviedbapi.results.TmdbResultsList; @@ -142,7 +142,7 @@ public class TmdbSearchTest extends AbstractTests { LOG.info("searchMovie"); // Try a movie with less than 1 page of results - TmdbResultsList movieList = instance.searchMovie("Blade Runner", 0, "", null, 0, 0, SearchType.PHRASE); + TmdbResultsList movieList = instance.searchMovie("Blade Runner", 0, "", null, 0, 0, SearchType.PHRASE); assertTrue("No movies found, should be at least 1", movieList.getResults().size() > 0); // Try a russian langugage movie