Refactor model layout

master
Stuart Boston 11 years ago
parent dc6a49bc97
commit 110b77d09a

@ -43,21 +43,21 @@ import com.omertron.themoviedbapi.model.Account;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.Certification;
import com.omertron.themoviedbapi.model.ChangedMedia;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.Configuration;
import com.omertron.themoviedbapi.model.Discover;
import com.omertron.themoviedbapi.model.discover.Discover;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.JobDepartment;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.KeywordMovie;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.keyword.KeywordMovie;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieDbList;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCredit;
import com.omertron.themoviedbapi.model.ReleaseInfo;
import com.omertron.themoviedbapi.model.Reviews;
import com.omertron.themoviedbapi.model.StatusCode;

@ -17,7 +17,7 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.enumeration;
/**
* ArtworkType enum List of the artwork types that are available

@ -132,6 +132,12 @@ public class TmdbAccount extends AbstractMethod {
* @throws MovieDbException
*/
public List getFavoriteTv(String sessionId, int accountId) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION, sessionId);
URL url = new ApiUrl(apiKey, MethodBase.ACCOUNT).setSubMethod(accountId,MethodSub.FAVORITE_TV).buildUrl(parameters);
String webpage = httpTools.getRequest(url);
throw new MovieDbException(ApiExceptionType.UNKNOWN_CAUSE, "Not implemented yet");
}

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.ChangedMedia;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.ArtworkType;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Discover;
import com.omertron.themoviedbapi.model.discover.Discover;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;

@ -20,8 +20,8 @@
package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.KeywordMovie;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.keyword.KeywordMovie;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;

@ -22,10 +22,10 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.ReleaseInfo;
import com.omertron.themoviedbapi.model.StatusCode;
import com.omertron.themoviedbapi.model.Translation;

@ -21,9 +21,9 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.ArtworkType;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCredit;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;

@ -22,10 +22,10 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;

@ -19,6 +19,7 @@
*/
package com.omertron.themoviedbapi.model;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

@ -19,6 +19,9 @@
*/
package com.omertron.themoviedbapi.model;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.person.PersonCast;
import com.omertron.themoviedbapi.model.person.PersonCrew;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.wrapper.WrapperAlternativeTitles;
import com.omertron.themoviedbapi.wrapper.WrapperImages;

@ -17,7 +17,7 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.change;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;

@ -17,11 +17,12 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.change;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.util.HashMap;
import java.util.Map;

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.change;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
public class ChangedMedia extends AbstractJsonMapping {

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.change;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
public class ChangedMovie extends AbstractJsonMapping {

@ -19,7 +19,7 @@
*/
package com.omertron.themoviedbapi.model.comparator;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.model.person.PersonCredit;
import java.io.Serializable;
import java.util.Comparator;
import java.util.regex.Matcher;

@ -17,7 +17,7 @@
* along with TheMovieDB API. If not;private see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.discover;
import com.omertron.themoviedbapi.tools.Param;
import com.omertron.themoviedbapi.tools.TmdbParameters;

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.keyword;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.omertron.themoviedbapi.model.AbstractIdName;
/**
* @author stuart.boston

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.keyword;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
/**
* @author Stuart

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.person;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.person;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.person;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.StringUtils;

@ -17,9 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.person;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

@ -17,7 +17,7 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model.person;
/**
* @author stuart.boston

@ -0,0 +1,20 @@
package com.omertron.themoviedbapi.model.tv;
import com.omertron.themoviedbapi.model.AbstractIdName;
public class AbstractTv extends AbstractIdName {
// Appendable responses for all tv elements
// @JsonProperty("credits")
// private Credits credits;
// @JsonProperty("external_ids")
// private ExternalIds externalIds;
// @JsonProperty("images")
// private MovieImages images;
// @JsonProperty("videos")
// private Video.Results videos;
}

@ -0,0 +1,7 @@
package com.omertron.themoviedbapi.model.tv;
import com.omertron.themoviedbapi.model.AbstractIdName;
public class Network extends AbstractIdName {
}

@ -0,0 +1,89 @@
package com.omertron.themoviedbapi.model.tv;
import com.fasterxml.jackson.annotation.JsonProperty;
public class TvEpisode extends AbstractTv {
@JsonProperty("overview")
private String overview;
@JsonProperty("air_date")
private String airDate;
@JsonProperty("episode_number")
private int episodeNumber;
@JsonProperty("still_path")
private String stillPath;
@JsonProperty("vote_average")
private float voteAverage;
@JsonProperty("vote_count")
private int voteCount;
public String getOverview() {
return overview;
}
public String getAirDate() {
return airDate;
}
public int getEpisodeNumber() {
return episodeNumber;
}
public String getStillPath() {
return stillPath;
}
public float getVoteAverage() {
return voteAverage;
}
public int getVoteCount() {
return voteCount;
}
public void setOverview(String overview) {
this.overview = overview;
}
public void setAirDate(String airDate) {
this.airDate = airDate;
}
public void setEpisodeNumber(int episodeNumber) {
this.episodeNumber = episodeNumber;
}
public void setStillPath(String stillPath) {
this.stillPath = stillPath;
}
public void setVoteAverage(float voteAverage) {
this.voteAverage = voteAverage;
}
public void setVoteCount(int voteCount) {
this.voteCount = voteCount;
}
}

@ -0,0 +1,79 @@
package com.omertron.themoviedbapi.model.tv;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class TvSeason extends AbstractTv {
@JsonProperty("air_date")
private String airDate;
@JsonProperty("poster_path")
private String posterPath;
@JsonProperty("season_number")
private int seasonNumber;
@JsonProperty("overview")
private String overview;
@JsonProperty("episodes")
private List<TvEpisode> episodes;
public String getAirDate() {
return airDate;
}
public String getPosterPath() {
return posterPath;
}
public int getSeasonNumber() {
return seasonNumber;
}
public void setEpisodes(List<TvEpisode> episodes) {
this.episodes = episodes;
}
public void setAirDate(String airDate) {
this.airDate = airDate;
}
public void setPosterPath(String posterPath) {
this.posterPath = posterPath;
}
public void setSeasonNumber(int seasonNumber) {
this.seasonNumber = seasonNumber;
}
public void setOverview(String overview) {
this.overview = overview;
}
public List<TvEpisode> getEpisodes() {
return episodes;
}
public String getOverview() {
return overview;
}
}

@ -0,0 +1,146 @@
package com.omertron.themoviedbapi.model.tv;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.person.Person;
import java.util.List;
public class TvSeries extends AbstractTv {
@JsonProperty("created_by")
private List<Person> createdBy;
@JsonProperty("episode_run_time")
private List<Integer> episodeRuntime;
@JsonProperty("first_air_date")
private String firstAirDate;
@JsonProperty("last_air_date")
private String lastAirDate;
@JsonProperty("genres")
private List<Genre> genres;
@JsonProperty("homepage")
private String homepage;
@JsonProperty("original_name")
private String originalName;
@JsonProperty("origin_country")
private List<String> originCountry;
@JsonProperty("networks")
private List<Network> networks;
@JsonProperty("overview")
private String overview;
@JsonProperty("popularity")
private float popularity;
@JsonProperty("backdrop_path")
private String backdropPath;
@JsonProperty("poster_path")
private String posterPath;
@JsonProperty("number_of_episodes")
private int numberOfEpisodes;
@JsonProperty("number_of_seasons")
private int numberOfSeasons;
@JsonProperty("seasons")
private List<TvSeason> seasons;
@JsonProperty("vote_average")
private float voteAverage;
@JsonProperty("vote_count")
private int voteCount;
@JsonProperty("status")
private String status;
public List<Person> getCreatedBy() {
return createdBy;
}
public List<Integer> getEpisodeRuntime() {
return episodeRuntime;
}
public String getFirstAirDate() {
return firstAirDate;
}
public String getLastAirDate() {
return lastAirDate;
}
public List<Genre> getGenres() {
return genres;
}
public String getHomepage() {
return homepage;
}
public String getOriginalName() {
return originalName;
}
public List<String> getOriginCountry() {
return originCountry;
}
public List<Network> getNetworks() {
return networks;
}
public String getOverview() {
return overview;
}
public float getPopularity() {
return popularity;
}
public String getBackdropPath() {
return backdropPath;
}
public String getPosterPath() {
return posterPath;
}
public int getNumberOfEpisodes() {
return numberOfEpisodes;
}
public int getNumberOfSeasons() {
return numberOfSeasons;
}
public List<TvSeason> getSeasons() {
return seasons;
}
public void setSeasons(List<TvSeason> seasons) {
this.seasons = seasons;
}
public float getVoteAverage() {
return voteAverage;
}
public int getVoteCount() {
return voteCount;
}
public String getStatus() {
return status;
}
}

@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
public enum MethodSub {
ADD_ITEM("add_item"),
ALT_TITLES("alternative_titles"),
CASTS("casts"),
CHANGES("changes"),
@ -31,7 +32,8 @@ public enum MethodSub {
COMPANY("company"),
CREDITS("credits"),
FAVORITE("favorite"),
FAVORITE_MOVIES("favorite_movies"),
FAVORITE_MOVIES("favorite/movies"),
FAVORITE_TV("favorite/tv"),
GUEST_SESSION("guest_session/new"),
IMAGES("images"),
ITEM_STATUS("item_status"),
@ -42,15 +44,14 @@ public enum MethodSub {
LISTS("lists"),
MOVIE("movie"),
MOVIES("movies"),
WATCHLIST("watchlist"),
WATCHLIST_MOVIES("watchlist/movies"),
WATCHLIST_TV("watchlist/tv"),
MOVIE_LIST("movie/list"),
NOW_PLAYING("now-playing"),
PERSON("person"),
POPULAR("popular"),
RATED_MOVIES("rated/movies"),
RATING("rating"),
RELEASES("releases"),
REMOVE_ITEM("remove_item"),
REVIEWS("reviews"),
SESSION_NEW("session/new"),
SIMILAR_MOVIES("similar_movies"),
@ -58,13 +59,13 @@ public enum MethodSub {
TOKEN_VALIDATE("token/validate_with_login"),
TOP_RATED("top-rated"),
TRANSLATIONS("translations"),
TV("tv"),
TV_LIST("tv/list"),
UPCOMING("upcoming"),
VIDEOS("videos"),
ADD_ITEM("add_item"),
REMOVE_ITEM("remove_item"),
MOVIE_LIST("movie/list"),
TV_LIST("tv/list"),
TV("tv");
WATCHLIST("watchlist"),
WATCHLIST_MOVIES("watchlist/movies"),
WATCHLIST_TV("watchlist/tv");
private final String value;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.ChangeKeyItem;
import com.omertron.themoviedbapi.model.change.ChangeKeyItem;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.ArtworkType;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.KeywordMovie;
import com.omertron.themoviedbapi.model.keyword.KeywordMovie;
import java.util.List;
/**

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import java.util.List;
/**

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.wrapper;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.ChangedMedia;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
public class WrapperMediaChanges extends AbstractWrapperAll {

@ -20,9 +20,9 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.PersonCast;
import com.omertron.themoviedbapi.model.PersonCrew;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCast;
import com.omertron.themoviedbapi.model.person.PersonCrew;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.wrapper;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.ChangedMovie;
import com.omertron.themoviedbapi.model.change.ChangedMovie;
public class WrapperMovieChanges extends AbstractWrapperAll {

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import java.io.Serializable;
import java.util.List;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import java.util.List;
/**

@ -20,8 +20,8 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.model.PersonType;
import com.omertron.themoviedbapi.model.person.PersonCredit;
import com.omertron.themoviedbapi.model.person.PersonType;
import java.util.ArrayList;
import java.util.List;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import java.util.List;
/**

@ -21,20 +21,20 @@ package com.omertron.themoviedbapi;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.ChangedMedia;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.Discover;
import com.omertron.themoviedbapi.model.discover.Discover;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.JobDepartment;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.KeywordMovie;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.keyword.KeywordMovie;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieDbList;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCredit;
import com.omertron.themoviedbapi.model.ReleaseInfo;
import com.omertron.themoviedbapi.model.Reviews;
import com.omertron.themoviedbapi.model.Configuration;

@ -27,11 +27,14 @@ import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieDbList;
import com.omertron.themoviedbapi.model.StatusCode;
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@ -59,6 +62,14 @@ public class TmdbAccountTest extends AbstractTests {
public static void tearDownClass() {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
/**
* Test of getAccountId method, of class TmdbAccount.
*
@ -183,4 +194,64 @@ public class TmdbAccountTest extends AbstractTests {
@Ignore("Tested as part of testGetWatchList")
public void testModifyWatchList() throws MovieDbException {
}
/**
* Test of getFavoriteTv method, of class TmdbAccount.
* @throws com.omertron.themoviedbapi.MovieDbException
*/
@Test
public void testGetFavoriteTv() throws MovieDbException {
System.out.println("getFavoriteTv");
List result = instance.getFavoriteTv(getSessionId(), getAccountId());
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of getRatedTV method, of class TmdbAccount.
* @throws com.omertron.themoviedbapi.MovieDbException
*/
@Test
public void testGetRatedTV() throws MovieDbException {
System.out.println("getRatedTV");
String sessionId = "";
int accountId = 0;
List expResult = null;
List result = instance.getRatedTV(sessionId, accountId);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of getWatchListMovie method, of class TmdbAccount.
* @throws com.omertron.themoviedbapi.MovieDbException
*/
@Test
public void testGetWatchListMovie() throws MovieDbException {
System.out.println("getWatchListMovie");
String sessionId = "";
int accountId = 0;
List<MovieDb> expResult = null;
List<MovieDb> result = instance.getWatchListMovie(sessionId, accountId);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of getWatchListTV method, of class TmdbAccount.
* @throws com.omertron.themoviedbapi.MovieDbException
*/
@Test
public void testGetWatchListTV() throws MovieDbException {
System.out.println("getWatchListTV");
String sessionId = "";
int accountId = 0;
List expResult = null;
List result = instance.getWatchListTV(sessionId, accountId);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.ChangedMedia;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.MethodBase;
import org.junit.AfterClass;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Discover;
import com.omertron.themoviedbapi.model.discover.Discover;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.junit.After;

@ -21,8 +21,8 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.KeywordMovie;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.keyword.KeywordMovie;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.junit.After;
import org.junit.AfterClass;

@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.ReleaseInfo;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.apache.commons.lang3.StringUtils;
import org.junit.After;

@ -23,10 +23,10 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;

Loading…
Cancel
Save