Added getMovieLists method
This commit is contained in:
@@ -26,6 +26,7 @@ import com.omertron.themoviedbapi.model.Company;
|
||||
import com.omertron.themoviedbapi.model.Genre;
|
||||
import com.omertron.themoviedbapi.model.Keyword;
|
||||
import com.omertron.themoviedbapi.model.MovieDb;
|
||||
import com.omertron.themoviedbapi.model.MovieList;
|
||||
import com.omertron.themoviedbapi.model.Person;
|
||||
import com.omertron.themoviedbapi.model.PersonCredit;
|
||||
import com.omertron.themoviedbapi.model.ReleaseInfo;
|
||||
@@ -90,7 +91,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getConfiguration method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testConfiguration() throws IOException {
|
||||
logger.info("Test Configuration");
|
||||
|
||||
@@ -106,7 +107,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of searchMovie method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSearchMovie() throws MovieDbException {
|
||||
logger.info("searchMovie");
|
||||
|
||||
@@ -127,7 +128,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieInfo method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieInfo() throws MovieDbException {
|
||||
logger.info("getMovieInfo");
|
||||
String language = "en";
|
||||
@@ -138,7 +139,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieAlternativeTitles method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieAlternativeTitles() throws MovieDbException {
|
||||
logger.info("getMovieAlternativeTitles");
|
||||
String country = "";
|
||||
@@ -154,7 +155,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieCasts method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieCasts() throws MovieDbException {
|
||||
logger.info("getMovieCasts");
|
||||
List<Person> people = tmdb.getMovieCasts(ID_MOVIE_BLADE_RUNNER);
|
||||
@@ -181,7 +182,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieImages method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieImages() throws MovieDbException {
|
||||
logger.info("getMovieImages");
|
||||
String language = "";
|
||||
@@ -192,7 +193,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieKeywords method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieKeywords() throws MovieDbException {
|
||||
logger.info("getMovieKeywords");
|
||||
List<Keyword> result = tmdb.getMovieKeywords(ID_MOVIE_BLADE_RUNNER);
|
||||
@@ -202,7 +203,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieReleaseInfo method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieReleaseInfo() throws MovieDbException {
|
||||
logger.info("getMovieReleaseInfo");
|
||||
List<ReleaseInfo> result = tmdb.getMovieReleaseInfo(ID_MOVIE_BLADE_RUNNER, "");
|
||||
@@ -212,7 +213,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieTrailers method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieTrailers() throws MovieDbException {
|
||||
logger.info("getMovieTrailers");
|
||||
List<Trailer> result = tmdb.getMovieTrailers(ID_MOVIE_BLADE_RUNNER, "");
|
||||
@@ -222,7 +223,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieTranslations method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieTranslations() throws MovieDbException {
|
||||
logger.info("getMovieTranslations");
|
||||
List<Translation> result = tmdb.getMovieTranslations(ID_MOVIE_BLADE_RUNNER);
|
||||
@@ -232,7 +233,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getCollectionInfo method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetCollectionInfo() throws MovieDbException {
|
||||
logger.info("getCollectionInfo");
|
||||
String language = "";
|
||||
@@ -245,7 +246,7 @@ public class TheMovieDbApiTest {
|
||||
*
|
||||
* @throws MovieDbException
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testCreateImageUrl() throws MovieDbException {
|
||||
logger.info("createImageUrl");
|
||||
MovieDb movie = tmdb.getMovieInfo(ID_MOVIE_BLADE_RUNNER, "");
|
||||
@@ -256,7 +257,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getMovieInfoImdb method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetMovieInfoImdb() throws MovieDbException {
|
||||
logger.info("getMovieInfoImdb");
|
||||
MovieDb result = tmdb.getMovieInfoImdb("tt0076759", "en-US");
|
||||
@@ -266,7 +267,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getApiKey method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetApiKey() {
|
||||
// Not required
|
||||
}
|
||||
@@ -274,7 +275,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getApiBase method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetApiBase() {
|
||||
// Not required
|
||||
}
|
||||
@@ -282,7 +283,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getConfiguration method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetConfiguration() {
|
||||
// Not required
|
||||
}
|
||||
@@ -290,7 +291,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of searchPeople method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSearchPeople() throws MovieDbException {
|
||||
logger.info("searchPeople");
|
||||
String personName = "Bruce Willis";
|
||||
@@ -302,7 +303,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getPersonInfo method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetPersonInfo() throws MovieDbException {
|
||||
logger.info("getPersonInfo");
|
||||
Person result = tmdb.getPersonInfo(ID_PERSON_BRUCE_WILLIS);
|
||||
@@ -312,7 +313,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getPersonCredits method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetPersonCredits() throws MovieDbException {
|
||||
logger.info("getPersonCredits");
|
||||
|
||||
@@ -323,7 +324,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getPersonImages method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetPersonImages() throws MovieDbException {
|
||||
logger.info("getPersonImages");
|
||||
|
||||
@@ -334,7 +335,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getLatestMovie method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetLatestMovie() throws MovieDbException {
|
||||
logger.info("getLatestMovie");
|
||||
MovieDb result = tmdb.getLatestMovie();
|
||||
@@ -345,7 +346,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of compareMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testCompareMovies() {
|
||||
// Not required
|
||||
}
|
||||
@@ -353,7 +354,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of setProxy method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSetProxy() {
|
||||
// Not required
|
||||
}
|
||||
@@ -361,7 +362,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of setTimeout method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSetTimeout() {
|
||||
// Not required
|
||||
}
|
||||
@@ -369,7 +370,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getNowPlayingMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetNowPlayingMovies() throws MovieDbException {
|
||||
logger.info("getNowPlayingMovies");
|
||||
List<MovieDb> results = tmdb.getNowPlayingMovies("", true);
|
||||
@@ -379,7 +380,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getPopularMovieList method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetPopularMovieList() throws MovieDbException {
|
||||
logger.info("getPopularMovieList");
|
||||
List<MovieDb> results = tmdb.getPopularMovieList("", true);
|
||||
@@ -389,7 +390,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getTopRatedMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetTopRatedMovies() throws MovieDbException {
|
||||
logger.info("getTopRatedMovies");
|
||||
List<MovieDb> results = tmdb.getTopRatedMovies("", true);
|
||||
@@ -399,7 +400,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getCompanyInfo method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetCompanyInfo() throws MovieDbException {
|
||||
logger.info("getCompanyInfo");
|
||||
Company company = tmdb.getCompanyInfo(ID_COMPANY_LUCASFILM);
|
||||
@@ -409,7 +410,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getCompanyMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetCompanyMovies() throws MovieDbException {
|
||||
logger.info("getCompanyMovies");
|
||||
List<MovieDb> results = tmdb.getCompanyMovies(ID_COMPANY_LUCASFILM, "", true);
|
||||
@@ -419,7 +420,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of searchCompanies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSearchCompanies() throws MovieDbException {
|
||||
logger.info("searchCompanies");
|
||||
List<Company> results = tmdb.searchCompanies(COMPANY_NAME, "", true);
|
||||
@@ -429,7 +430,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getSimilarMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetSimilarMovies() throws MovieDbException {
|
||||
logger.info("getSimilarMovies");
|
||||
List<MovieDb> results = tmdb.getSimilarMovies(ID_MOVIE_BLADE_RUNNER, "", true);
|
||||
@@ -439,7 +440,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getGenreList method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetGenreList() throws MovieDbException {
|
||||
logger.info("getGenreList");
|
||||
List<Genre> results = tmdb.getGenreList("");
|
||||
@@ -449,7 +450,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getGenreMovies method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetGenreMovies() throws MovieDbException {
|
||||
logger.info("getGenreMovies");
|
||||
List<MovieDb> results = tmdb.getGenreMovies(ID_GENRE_ACTION, "", true);
|
||||
@@ -459,7 +460,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getUpcoming method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetUpcoming() throws Exception {
|
||||
logger.info("getUpcoming");
|
||||
List<MovieDb> results = tmdb.getUpcoming("");
|
||||
@@ -469,7 +470,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getCollectionImages method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetCollectionImages() throws Exception {
|
||||
logger.info("getCollectionImages");
|
||||
String language = "";
|
||||
@@ -480,7 +481,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getAuthorisationToken method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetAuthorisationToken() throws Exception {
|
||||
logger.info("getAuthorisationToken");
|
||||
TokenAuthorisation result = tmdb.getAuthorisationToken();
|
||||
@@ -492,7 +493,7 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getSessionToken method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetSessionToken() throws Exception {
|
||||
logger.info("getSessionToken");
|
||||
TokenAuthorisation token = tmdb.getAuthorisationToken();
|
||||
@@ -509,11 +510,20 @@ public class TheMovieDbApiTest {
|
||||
/**
|
||||
* Test of getGuestSessionToken method, of class TheMovieDbApi.
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGetGuestSessionToken() throws Exception {
|
||||
logger.info("getGuestSessionToken");
|
||||
TokenSession result = tmdb.getGuestSessionToken();
|
||||
|
||||
assertTrue("Failed to get guest session", result.getSuccess());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetMovieLists() throws Exception {
|
||||
logger.info("getMovieLists");
|
||||
String language = "en";
|
||||
List<MovieList> results = tmdb.getMovieLists(ID_MOVIE_BLADE_RUNNER, language, 0);
|
||||
assertNotNull("No results found", results);
|
||||
assertTrue("No results found", results.size() > 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user