Minor updates

master
Stuart Boston 12 years ago
parent 9eed62c8d7
commit db4f3e6f80

@ -16,7 +16,7 @@ public class ChangeKeyItem {
private String key; private String key;
@JsonProperty("items") @JsonProperty("items")
private List<ChangedItem> changedItems = new ArrayList<ChangedItem>(); private List<ChangedItem> changedItems = new ArrayList<ChangedItem>();
private Map<String, Object> newItems = new HashMap<String, Object>(); private final Map<String, Object> newItems = new HashMap<String, Object>();
public String getKey() { public String getKey() {
return key; return key;

@ -20,7 +20,7 @@ public class ChangedItem extends AbstractJsonMapping {
private String language; private String language;
@JsonProperty("value") @JsonProperty("value")
private Object value; private Object value;
private Map<String, Object> newItems = new HashMap<String, Object>(); private final Map<String, Object> newItems = new HashMap<String, Object>();
public String getId() { public String getId() {
return id; return id;

@ -35,7 +35,7 @@ import static com.omertron.themoviedbapi.tools.ApiUrl.*;
*/ */
public class Discover { public class Discover {
private Map<String, String> params = new HashMap<String, String>(); private final Map<String, String> params = new HashMap<String, String>();
private static final String PARAM_PRIMARY_RELEASE_YEAR = "primary_release_year="; private static final String PARAM_PRIMARY_RELEASE_YEAR = "primary_release_year=";
private static final String PARAM_VOTE_COUNT_GTE = "vote_count.gte="; private static final String PARAM_VOTE_COUNT_GTE = "vote_count.gte=";
private static final String PARAM_VOTE_AVERAGE_GTE = "vote_average.gte="; private static final String PARAM_VOTE_AVERAGE_GTE = "vote_average.gte=";
@ -64,6 +64,7 @@ public class Discover {
* Minimum value is 1 if included. * Minimum value is 1 if included.
* *
* @param page * @param page
* @return
*/ */
public Discover page(int page) { public Discover page(int page) {
if (page > 0) { if (page > 0) {
@ -76,6 +77,7 @@ public class Discover {
* ISO 639-1 code * ISO 639-1 code
* *
* @param language * @param language
* @return
*/ */
public Discover language(String language) { public Discover language(String language) {
if (StringUtils.isNotBlank(language)) { if (StringUtils.isNotBlank(language)) {
@ -94,6 +96,7 @@ public class Discover {
* popularity.asc * popularity.asc
* *
* @param sortBy * @param sortBy
* @return
*/ */
public Discover sortBy(String sortBy) { public Discover sortBy(String sortBy) {
if (StringUtils.isNotBlank(sortBy)) { if (StringUtils.isNotBlank(sortBy)) {
@ -106,6 +109,7 @@ public class Discover {
* Toggle the inclusion of adult titles * Toggle the inclusion of adult titles
* *
* @param includeAdult * @param includeAdult
* @return
*/ */
public Discover includeAdult(boolean includeAdult) { public Discover includeAdult(boolean includeAdult) {
params.put(PARAM_ADULT, String.valueOf(includeAdult)); params.put(PARAM_ADULT, String.valueOf(includeAdult));
@ -116,6 +120,7 @@ public class Discover {
* Filter the results release dates to matches that include this value. * Filter the results release dates to matches that include this value.
* *
* @param year * @param year
* @return
*/ */
public Discover year(int year) { public Discover year(int year) {
if (checkYear(year)) { if (checkYear(year)) {
@ -128,6 +133,7 @@ public class Discover {
* Filter the results so that only the primary release date year has this value * Filter the results so that only the primary release date year has this value
* *
* @param primaryReleaseYear * @param primaryReleaseYear
* @return
*/ */
public Discover primaryReleaseYear(int primaryReleaseYear) { public Discover primaryReleaseYear(int primaryReleaseYear) {
if (checkYear(primaryReleaseYear)) { if (checkYear(primaryReleaseYear)) {
@ -140,6 +146,7 @@ public class Discover {
* Only include movies that are equal to, or have a vote count higher than this value * Only include movies that are equal to, or have a vote count higher than this value
* *
* @param voteCountGte * @param voteCountGte
* @return
*/ */
public Discover voteCountGte(int voteCountGte) { public Discover voteCountGte(int voteCountGte) {
if (voteCountGte > 0) { if (voteCountGte > 0) {
@ -152,6 +159,7 @@ public class Discover {
* Only include movies that are equal to, or have a higher average rating than this value * Only include movies that are equal to, or have a higher average rating than this value
* *
* @param voteAverageGte * @param voteAverageGte
* @return
*/ */
public Discover voteAverageGte(float voteAverageGte) { public Discover voteAverageGte(float voteAverageGte) {
if (voteAverageGte > 0) { if (voteAverageGte > 0) {
@ -170,6 +178,7 @@ public class Discover {
* Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR' * Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'
* *
* @param withGenres * @param withGenres
* @return
*/ */
public Discover withGenres(String withGenres) { public Discover withGenres(String withGenres) {
if (StringUtils.isNotBlank(withGenres)) { if (StringUtils.isNotBlank(withGenres)) {
@ -184,6 +193,7 @@ public class Discover {
* Expected format is YYYY-MM-DD. * Expected format is YYYY-MM-DD.
* *
* @param releaseDateGte * @param releaseDateGte
* @return
*/ */
public Discover releaseDateGte(String releaseDateGte) { public Discover releaseDateGte(String releaseDateGte) {
if (StringUtils.isNotBlank(releaseDateGte)) { if (StringUtils.isNotBlank(releaseDateGte)) {
@ -198,6 +208,7 @@ public class Discover {
* Expected format is YYYY-MM-DD. * Expected format is YYYY-MM-DD.
* *
* @param releaseDateLte * @param releaseDateLte
* @return
*/ */
public Discover releaseDateLte(String releaseDateLte) { public Discover releaseDateLte(String releaseDateLte) {
if (StringUtils.isNotBlank(releaseDateLte)) { if (StringUtils.isNotBlank(releaseDateLte)) {
@ -214,6 +225,7 @@ public class Discover {
* A ISO 3166-1 is expected * A ISO 3166-1 is expected
* *
* @param certificationCountry * @param certificationCountry
* @return
*/ */
public Discover certificationCountry(String certificationCountry) { public Discover certificationCountry(String certificationCountry) {
if (StringUtils.isNotBlank(certificationCountry)) { if (StringUtils.isNotBlank(certificationCountry)) {
@ -228,6 +240,7 @@ public class Discover {
* Expected value is a valid certification for the specified 'certificationCountry'. * Expected value is a valid certification for the specified 'certificationCountry'.
* *
* @param certificationLte * @param certificationLte
* @return
*/ */
public Discover certificationLte(String certificationLte) { public Discover certificationLte(String certificationLte) {
if (StringUtils.isNotBlank(certificationLte)) { if (StringUtils.isNotBlank(certificationLte)) {
@ -244,6 +257,7 @@ public class Discover {
* They can be comma separated to indicate an 'AND' query * They can be comma separated to indicate an 'AND' query
* *
* @param withCompanies * @param withCompanies
* @return
*/ */
public Discover withCompanies(String withCompanies) { public Discover withCompanies(String withCompanies) {
if (StringUtils.isNotBlank(withCompanies)) { if (StringUtils.isNotBlank(withCompanies)) {

@ -70,8 +70,8 @@ public class TmdbConfiguration extends AbstractJsonMapping {
public String getSecureBaseUrl() { public String getSecureBaseUrl() {
return secureBaseUrl; return secureBaseUrl;
} }
// </editor-fold> // </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Setter methods">//GEN-BEGIN:setterMethods // <editor-fold defaultstate="collapsed" desc="Setter methods">//GEN-BEGIN:setterMethods
public void setBackdropSizes(List<String> backdropSizes) { public void setBackdropSizes(List<String> backdropSizes) {
this.backdropSizes = backdropSizes; this.backdropSizes = backdropSizes;
@ -115,6 +115,7 @@ public class TmdbConfiguration extends AbstractJsonMapping {
* Check that the poster size is valid * Check that the poster size is valid
* *
* @param posterSize * @param posterSize
* @return
*/ */
public boolean isValidPosterSize(String posterSize) { public boolean isValidPosterSize(String posterSize) {
if (StringUtils.isBlank(posterSize) || posterSizes.isEmpty()) { if (StringUtils.isBlank(posterSize) || posterSizes.isEmpty()) {
@ -127,6 +128,7 @@ public class TmdbConfiguration extends AbstractJsonMapping {
* Check that the backdrop size is valid * Check that the backdrop size is valid
* *
* @param backdropSize * @param backdropSize
* @return
*/ */
public boolean isValidBackdropSize(String backdropSize) { public boolean isValidBackdropSize(String backdropSize) {
if (StringUtils.isBlank(backdropSize) || backdropSizes.isEmpty()) { if (StringUtils.isBlank(backdropSize) || backdropSizes.isEmpty()) {
@ -139,6 +141,7 @@ public class TmdbConfiguration extends AbstractJsonMapping {
* Check that the profile size is valid * Check that the profile size is valid
* *
* @param profileSize * @param profileSize
* @return
*/ */
public boolean isValidProfileSize(String profileSize) { public boolean isValidProfileSize(String profileSize) {
if (StringUtils.isBlank(profileSize) || profileSizes.isEmpty()) { if (StringUtils.isBlank(profileSize) || profileSizes.isEmpty()) {
@ -151,6 +154,7 @@ public class TmdbConfiguration extends AbstractJsonMapping {
* Check that the logo size is valid * Check that the logo size is valid
* *
* @param logoSize * @param logoSize
* @return
*/ */
public boolean isValidLogoSize(String logoSize) { public boolean isValidLogoSize(String logoSize) {
if (StringUtils.isBlank(logoSize) || logoSizes.isEmpty()) { if (StringUtils.isBlank(logoSize) || logoSizes.isEmpty()) {
@ -163,6 +167,7 @@ public class TmdbConfiguration extends AbstractJsonMapping {
* Check to see if the size is valid for any of the images types * Check to see if the size is valid for any of the images types
* *
* @param sizeToCheck * @param sizeToCheck
* @return
*/ */
public boolean isValidSize(String sizeToCheck) { public boolean isValidSize(String sizeToCheck) {
return (isValidPosterSize(sizeToCheck) return (isValidPosterSize(sizeToCheck)

@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
public class TokenAuthorisation { public class TokenAuthorisation extends AbstractJsonMapping {
/* /*
* Properties * Properties
@ -62,9 +62,4 @@ public class TokenAuthorisation {
this.success = success; this.success = success;
} }
// </editor-fold> // </editor-fold>
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
} }

@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
public class TokenSession { public class TokenSession extends AbstractJsonMapping {
/* /*
* Properties * Properties
@ -92,9 +92,4 @@ public class TokenSession {
this.expiresAt = expiresAt; this.expiresAt = expiresAt;
} }
// </editor-fold> // </editor-fold>
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
} }

@ -40,7 +40,6 @@ public class Translation extends AbstractJsonMapping {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
//<editor-fold defaultstate="collapsed" desc="Getter methods">
public String getEnglishName() { public String getEnglishName() {
return englishName; return englishName;
} }

@ -19,7 +19,6 @@
*/ */
package com.omertron.themoviedbapi.wrapper; package com.omertron.themoviedbapi.wrapper;
import com.omertron.themoviedbapi.model.*;
import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable; import java.io.Serializable;

@ -15,7 +15,7 @@ public class WrapperChanges {
@JsonProperty("changes") @JsonProperty("changes")
private List<ChangeKeyItem> changedItems = new ArrayList<ChangeKeyItem>(); private List<ChangeKeyItem> changedItems = new ArrayList<ChangeKeyItem>();
private Map<String, Object> newItems = new HashMap<String, Object>(); private final Map<String, Object> newItems = new HashMap<String, Object>();
public List<ChangeKeyItem> getChangedItems() { public List<ChangeKeyItem> getChangedItems() {
return changedItems; return changedItems;

@ -71,6 +71,7 @@ public class WrapperImages extends AbstractWrapperAll implements Serializable {
* *
* Leaving the parameters blank will return all types * Leaving the parameters blank will return all types
* *
* @param artworkList
* @return * @return
*/ */
public List<Artwork> getAll(ArtworkType... artworkList) { public List<Artwork> getAll(ArtworkType... artworkList) {

@ -25,7 +25,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@ -123,7 +122,7 @@ public class TheMovieDbApiTest {
* Test of getConfiguration method, of class TheMovieDbApi. * Test of getConfiguration method, of class TheMovieDbApi.
*/ */
@Test @Test
public void testConfiguration() throws IOException { public void testConfiguration() {
LOG.info("Test Configuration"); LOG.info("Test Configuration");
TmdbConfiguration tmdbConfig = tmdb.getConfiguration(); TmdbConfiguration tmdbConfig = tmdb.getConfiguration();
@ -182,6 +181,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchMovie method, of class TheMovieDbApi. * Test of searchMovie method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchMovie() throws MovieDbException { public void testSearchMovie() throws MovieDbException {
@ -203,6 +204,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieInfo method, of class TheMovieDbApi. * Test of getMovieInfo method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieInfo() throws MovieDbException { public void testGetMovieInfo() throws MovieDbException {
@ -213,6 +216,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieAlternativeTitles method, of class TheMovieDbApi. * Test of getMovieAlternativeTitles method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieAlternativeTitles() throws MovieDbException { public void testGetMovieAlternativeTitles() throws MovieDbException {
@ -229,6 +234,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieCasts method, of class TheMovieDbApi. * Test of getMovieCasts method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieCasts() throws MovieDbException { public void testGetMovieCasts() throws MovieDbException {
@ -256,6 +263,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieImages method, of class TheMovieDbApi. * Test of getMovieImages method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieImages() throws MovieDbException { public void testGetMovieImages() throws MovieDbException {
@ -267,6 +276,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieKeywords method, of class TheMovieDbApi. * Test of getMovieKeywords method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieKeywords() throws MovieDbException { public void testGetMovieKeywords() throws MovieDbException {
@ -277,6 +288,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieReleaseInfo method, of class TheMovieDbApi. * Test of getMovieReleaseInfo method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieReleaseInfo() throws MovieDbException { public void testGetMovieReleaseInfo() throws MovieDbException {
@ -287,6 +300,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieTrailers method, of class TheMovieDbApi. * Test of getMovieTrailers method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieTrailers() throws MovieDbException { public void testGetMovieTrailers() throws MovieDbException {
@ -297,6 +312,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieTranslations method, of class TheMovieDbApi. * Test of getMovieTranslations method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieTranslations() throws MovieDbException { public void testGetMovieTranslations() throws MovieDbException {
@ -307,6 +324,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getCollectionInfo method, of class TheMovieDbApi. * Test of getCollectionInfo method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetCollectionInfo() throws MovieDbException { public void testGetCollectionInfo() throws MovieDbException {
@ -331,6 +350,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieInfoImdb method, of class TheMovieDbApi. * Test of getMovieInfoImdb method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieInfoImdb() throws MovieDbException { public void testGetMovieInfoImdb() throws MovieDbException {
@ -341,6 +362,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of getApiKey method, of class TheMovieDbApi. * Test of getApiKey method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testGetApiKey() { public void testGetApiKey() {
@ -349,6 +371,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of getApiBase method, of class TheMovieDbApi. * Test of getApiBase method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testGetApiBase() { public void testGetApiBase() {
@ -357,6 +380,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of getConfiguration method, of class TheMovieDbApi. * Test of getConfiguration method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testGetConfiguration() { public void testGetConfiguration() {
@ -365,6 +389,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchPeople method, of class TheMovieDbApi. * Test of searchPeople method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchPeople() throws MovieDbException { public void testSearchPeople() throws MovieDbException {
@ -377,6 +403,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonInfo method, of class TheMovieDbApi. * Test of getPersonInfo method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetPersonInfo() throws MovieDbException { public void testGetPersonInfo() throws MovieDbException {
@ -387,6 +415,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonCredits method, of class TheMovieDbApi. * Test of getPersonCredits method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetPersonCredits() throws MovieDbException { public void testGetPersonCredits() throws MovieDbException {
@ -398,6 +428,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonImages method, of class TheMovieDbApi. * Test of getPersonImages method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetPersonImages() throws MovieDbException { public void testGetPersonImages() throws MovieDbException {
@ -409,6 +441,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getLatestMovie method, of class TheMovieDbApi. * Test of getLatestMovie method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetLatestMovie() throws MovieDbException { public void testGetLatestMovie() throws MovieDbException {
@ -420,6 +454,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of compareMovies method, of class TheMovieDbApi. * Test of compareMovies method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testCompareMovies() { public void testCompareMovies() {
@ -428,6 +463,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of setProxy method, of class TheMovieDbApi. * Test of setProxy method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testSetProxy() { public void testSetProxy() {
@ -436,6 +472,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of setTimeout method, of class TheMovieDbApi. * Test of setTimeout method, of class TheMovieDbApi.
*
*/ */
@Test @Test
public void testSetTimeout() { public void testSetTimeout() {
@ -444,6 +481,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getNowPlayingMovies method, of class TheMovieDbApi. * Test of getNowPlayingMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetNowPlayingMovies() throws MovieDbException { public void testGetNowPlayingMovies() throws MovieDbException {
@ -454,6 +493,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPopularMovieList method, of class TheMovieDbApi. * Test of getPopularMovieList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetPopularMovieList() throws MovieDbException { public void testGetPopularMovieList() throws MovieDbException {
@ -464,6 +505,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getTopRatedMovies method, of class TheMovieDbApi. * Test of getTopRatedMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetTopRatedMovies() throws MovieDbException { public void testGetTopRatedMovies() throws MovieDbException {
@ -474,6 +517,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getCompanyInfo method, of class TheMovieDbApi. * Test of getCompanyInfo method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetCompanyInfo() throws MovieDbException { public void testGetCompanyInfo() throws MovieDbException {
@ -485,6 +530,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getCompanyMovies method, of class TheMovieDbApi. * Test of getCompanyMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetCompanyMovies() throws MovieDbException { public void testGetCompanyMovies() throws MovieDbException {
@ -495,6 +542,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchCompanies method, of class TheMovieDbApi. * Test of searchCompanies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchCompanies() throws MovieDbException { public void testSearchCompanies() throws MovieDbException {
@ -505,6 +554,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getSimilarMovies method, of class TheMovieDbApi. * Test of getSimilarMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetSimilarMovies() throws MovieDbException { public void testGetSimilarMovies() throws MovieDbException {
@ -515,6 +566,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getGenreList method, of class TheMovieDbApi. * Test of getGenreList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetGenreList() throws MovieDbException { public void testGetGenreList() throws MovieDbException {
@ -525,6 +578,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getGenreMovies method, of class TheMovieDbApi. * Test of getGenreMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetGenreMovies() throws MovieDbException { public void testGetGenreMovies() throws MovieDbException {
@ -535,6 +590,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getUpcoming method, of class TheMovieDbApi. * Test of getUpcoming method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetUpcoming() throws Exception { public void testGetUpcoming() throws Exception {
@ -545,6 +602,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getCollectionImages method, of class TheMovieDbApi. * Test of getCollectionImages method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetCollectionImages() throws Exception { public void testGetCollectionImages() throws Exception {
@ -555,6 +614,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getAuthorisationToken method, of class TheMovieDbApi. * Test of getAuthorisationToken method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetAuthorisationToken() throws Exception { public void testGetAuthorisationToken() throws Exception {
@ -569,6 +630,8 @@ public class TheMovieDbApiTest {
* Test of getSessionToken method, of class TheMovieDbApi. * Test of getSessionToken method, of class TheMovieDbApi.
* *
* TODO: Cannot be tested without a HTTP authorisation: http://help.themoviedb.org/kb/api/user-authentication * TODO: Cannot be tested without a HTTP authorisation: http://help.themoviedb.org/kb/api/user-authentication
*
* @throws MovieDbException
*/ */
@Ignore("Session required") @Ignore("Session required")
public void testGetSessionToken() throws Exception { public void testGetSessionToken() throws Exception {
@ -586,6 +649,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getGuestSessionToken method, of class TheMovieDbApi. * Test of getGuestSessionToken method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not ready yet") @Ignore("Not ready yet")
public void testGetGuestSessionToken() throws Exception { public void testGetGuestSessionToken() throws Exception {
@ -607,6 +672,8 @@ public class TheMovieDbApiTest {
* Test of getMovieChanges method,of class TheMovieDbApi * Test of getMovieChanges method,of class TheMovieDbApi
* *
* TODO: Do not test this until it is fixed * TODO: Do not test this until it is fixed
*
* @throws MovieDbException
*/ */
@Ignore("Do not test this until it is fixed") @Ignore("Do not test this until it is fixed")
public void testGetMovieChanges() throws Exception { public void testGetMovieChanges() throws Exception {
@ -637,6 +704,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchCollection method, of class TheMovieDbApi. * Test of searchCollection method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchCollection() throws Exception { public void testSearchCollection() throws Exception {
@ -650,6 +719,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchList method, of class TheMovieDbApi. * Test of searchList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchList() throws Exception { public void testSearchList() throws Exception {
@ -663,6 +734,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of searchKeyword method, of class TheMovieDbApi. * Test of searchKeyword method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testSearchKeyword() throws Exception { public void testSearchKeyword() throws Exception {
@ -678,6 +751,8 @@ public class TheMovieDbApiTest {
* Test of postMovieRating method, of class TheMovieDbApi. * Test of postMovieRating method, of class TheMovieDbApi.
* *
* TODO: Cannot be tested without a HTTP authorisation: http://help.themoviedb.org/kb/api/user-authentication * TODO: Cannot be tested without a HTTP authorisation: http://help.themoviedb.org/kb/api/user-authentication
*
* @throws MovieDbException
*/ */
@Ignore("Session required") @Ignore("Session required")
public void testMovieRating() throws Exception { public void testMovieRating() throws Exception {
@ -691,7 +766,6 @@ public class TheMovieDbApiTest {
assertTrue(wasPosted); assertTrue(wasPosted);
// get all rated movies // get all rated movies
List<MovieDb> ratedMovies = tmdb.getRatedMovies(SESSION_ID_APITESTS, ACCOUNT_ID_APITESTS); List<MovieDb> ratedMovies = tmdb.getRatedMovies(SESSION_ID_APITESTS, ACCOUNT_ID_APITESTS);
assertTrue(ratedMovies.size() > 0); assertTrue(ratedMovies.size() > 0);
@ -735,6 +809,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonChanges method, of class TheMovieDbApi. * Test of getPersonChanges method, of class TheMovieDbApi.
* *
* @throws MovieDbException
*/ */
@Ignore("Not ready yet") @Ignore("Not ready yet")
public void testGetPersonChanges() throws Exception { public void testGetPersonChanges() throws Exception {
@ -746,6 +821,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getList method, of class TheMovieDbApi. * Test of getList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetList() throws Exception { public void testGetList() throws Exception {
@ -757,6 +834,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getKeyword method, of class TheMovieDbApi. * Test of getKeyword method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetKeyword() throws Exception { public void testGetKeyword() throws Exception {
@ -767,6 +846,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getKeywordMovies method, of class TheMovieDbApi. * Test of getKeywordMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetKeywordMovies() throws Exception { public void testGetKeywordMovies() throws Exception {
@ -778,6 +859,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getReviews method, of class TheMovieDbApi. * Test of getReviews method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetReviews() throws Exception { public void testGetReviews() throws Exception {
@ -790,6 +873,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of compareMovies method, of class TheMovieDbApi. * Test of compareMovies method, of class TheMovieDbApi.
*
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testCompareMovies_3args() { public void testCompareMovies_3args() {
@ -797,6 +881,7 @@ public class TheMovieDbApiTest {
/** /**
* Test of compareMovies method, of class TheMovieDbApi. * Test of compareMovies method, of class TheMovieDbApi.
*
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testCompareMovies_4args() { public void testCompareMovies_4args() {
@ -804,13 +889,17 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonPopular method, of class TheMovieDbApi. * Test of getPersonPopular method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testGetPersonPopular_0args() throws Exception { public void testGetPersonPopular_0args() {
} }
/** /**
* Test of getPersonPopular method, of class TheMovieDbApi. * Test of getPersonPopular method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetPersonPopular_int() throws Exception { public void testGetPersonPopular_int() throws Exception {
@ -822,6 +911,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getGenreMovies method, of class TheMovieDbApi. * Test of getGenreMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testGetGenreMovies_3args() throws Exception { public void testGetGenreMovies_3args() throws Exception {
@ -829,6 +920,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getGenreMovies method, of class TheMovieDbApi. * Test of getGenreMovies method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testGetGenreMovies_4args() throws Exception { public void testGetGenreMovies_4args() throws Exception {
@ -836,6 +929,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getMovieChangesList method, of class TheMovieDbApi. * Test of getMovieChangesList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetMovieChangesList() throws Exception { public void testGetMovieChangesList() throws Exception {
@ -849,6 +944,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getPersonChangesList method, of class TheMovieDbApi. * Test of getPersonChangesList method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not ready yet") @Ignore("Not ready yet")
public void testGetPersonChangesList() throws Exception { public void testGetPersonChangesList() throws Exception {
@ -863,6 +960,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getJobs method, of class TheMovieDbApi. * Test of getJobs method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetJobs() throws Exception { public void testGetJobs() throws Exception {
@ -873,6 +972,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getDiscover method, of class TheMovieDbApi. * Test of getDiscover method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Ignore("Not required") @Ignore("Not required")
public void testGetDiscover_14args() throws Exception { public void testGetDiscover_14args() throws Exception {
@ -880,6 +981,8 @@ public class TheMovieDbApiTest {
/** /**
* Test of getDiscover method, of class TheMovieDbApi. * Test of getDiscover method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/ */
@Test @Test
public void testGetDiscover_Discover() throws Exception { public void testGetDiscover_Discover() throws Exception {

Loading…
Cancel
Save