Updated project structure

This commit is contained in:
Stuart Boston
2012-11-01 14:35:47 +00:00
parent 887a241248
commit e5e6b1d08e
47 changed files with 195 additions and 147 deletions
@@ -7,10 +7,24 @@
* For any reuse or distribution, you must make clear to others the
* license terms of this work.
*/
package com.moviejukebox.themoviedb;
package com.omertron.themoviedbapi;
import com.moviejukebox.themoviedb.model.*;
import com.moviejukebox.themoviedb.tools.FilteringLayout;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.CollectionInfo;
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.Person;
import com.omertron.themoviedbapi.model.PersonCredit;
import com.omertron.themoviedbapi.model.ReleaseInfo;
import com.omertron.themoviedbapi.model.TmdbConfiguration;
import com.omertron.themoviedbapi.model.TokenAuthorisation;
import com.omertron.themoviedbapi.model.TokenSession;
import com.omertron.themoviedbapi.model.Trailer;
import com.omertron.themoviedbapi.model.Translation;
import com.omertron.themoviedbapi.tools.FilteringLayout;
import java.io.IOException;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
@@ -20,17 +34,17 @@ import org.junit.*;
import static org.junit.Assert.*;
/**
* Test cases for TheMovieDb API
* Test cases for TheMovieDbApi API
*
* @author stuart.boston
*/
public class TheMovieDbTest {
public class TheMovieDbApiTest {
// Logger
private static final Logger LOGGER = Logger.getLogger(TheMovieDbTest.class);
private static final Logger LOGGER = Logger.getLogger(TheMovieDbApiTest.class);
// API Key
private static final String API_KEY = "5a1a77e2eba8984804586122754f969f";
private static TheMovieDb tmdb;
private static TheMovieDbApi tmdb;
// Test data
private static final int ID_MOVIE_BLADE_RUNNER = 78;
private static final int ID_MOVIE_STAR_WARS_COLLECTION = 10;
@@ -39,8 +53,8 @@ public class TheMovieDbTest {
private static final String COMPANY_NAME = "Marvel Studios";
private static final int ID_GENRE_ACTION = 28;
public TheMovieDbTest() throws MovieDbException {
tmdb = new TheMovieDb(API_KEY);
public TheMovieDbApiTest() throws MovieDbException {
tmdb = new TheMovieDbApi(API_KEY);
}
@BeforeClass
@@ -48,7 +62,7 @@ public class TheMovieDbTest {
// Set the logger level to TRACE
Logger.getRootLogger().setLevel(Level.TRACE);
// Show the version of the API
TheMovieDb.showVersion();
TheMovieDbApi.showVersion();
}
@AfterClass
@@ -66,7 +80,7 @@ public class TheMovieDbTest {
}
/**
* Test of getConfiguration method, of class TheMovieDb.
* Test of getConfiguration method, of class TheMovieDbApi.
*/
@Test
public void testConfiguration() throws IOException {
@@ -82,7 +96,7 @@ public class TheMovieDbTest {
}
/**
* Test of showVersion method, of class TheMovieDb.
* Test of showVersion method, of class TheMovieDbApi.
*/
@Test
public void testShowVersion() {
@@ -90,7 +104,7 @@ public class TheMovieDbTest {
}
/**
* Test of searchMovie method, of class TheMovieDb.
* Test of searchMovie method, of class TheMovieDbApi.
*/
@Test
public void testSearchMovie() throws MovieDbException {
@@ -111,7 +125,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieInfo method, of class TheMovieDb.
* Test of getMovieInfo method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieInfo() throws MovieDbException {
@@ -122,7 +136,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieAlternativeTitles method, of class TheMovieDb.
* Test of getMovieAlternativeTitles method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieAlternativeTitles() throws MovieDbException {
@@ -138,7 +152,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieCasts method, of class TheMovieDb.
* Test of getMovieCasts method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieCasts() throws MovieDbException {
@@ -165,7 +179,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieImages method, of class TheMovieDb.
* Test of getMovieImages method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieImages() throws MovieDbException {
@@ -176,7 +190,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieKeywords method, of class TheMovieDb.
* Test of getMovieKeywords method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieKeywords() throws MovieDbException {
@@ -186,7 +200,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieReleaseInfo method, of class TheMovieDb.
* Test of getMovieReleaseInfo method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieReleaseInfo() throws MovieDbException {
@@ -196,7 +210,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieTrailers method, of class TheMovieDb.
* Test of getMovieTrailers method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieTrailers() throws MovieDbException {
@@ -206,7 +220,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieTranslations method, of class TheMovieDb.
* Test of getMovieTranslations method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieTranslations() throws MovieDbException {
@@ -216,7 +230,7 @@ public class TheMovieDbTest {
}
/**
* Test of getCollectionInfo method, of class TheMovieDb.
* Test of getCollectionInfo method, of class TheMovieDbApi.
*/
@Test
public void testGetCollectionInfo() throws MovieDbException {
@@ -227,7 +241,7 @@ public class TheMovieDbTest {
}
/**
* Test of createImageUrl method, of class TheMovieDb.
* Test of createImageUrl method, of class TheMovieDbApi.
* @throws MovieDbException
*/
@Test
@@ -239,7 +253,7 @@ public class TheMovieDbTest {
}
/**
* Test of getMovieInfoImdb method, of class TheMovieDb.
* Test of getMovieInfoImdb method, of class TheMovieDbApi.
*/
@Test
public void testGetMovieInfoImdb() throws MovieDbException {
@@ -249,7 +263,7 @@ public class TheMovieDbTest {
}
/**
* Test of getApiKey method, of class TheMovieDb.
* Test of getApiKey method, of class TheMovieDbApi.
*/
@Test
public void testGetApiKey() {
@@ -257,7 +271,7 @@ public class TheMovieDbTest {
}
/**
* Test of getApiBase method, of class TheMovieDb.
* Test of getApiBase method, of class TheMovieDbApi.
*/
@Test
public void testGetApiBase() {
@@ -265,7 +279,7 @@ public class TheMovieDbTest {
}
/**
* Test of getConfiguration method, of class TheMovieDb.
* Test of getConfiguration method, of class TheMovieDbApi.
*/
@Test
public void testGetConfiguration() {
@@ -273,7 +287,7 @@ public class TheMovieDbTest {
}
/**
* Test of searchPeople method, of class TheMovieDb.
* Test of searchPeople method, of class TheMovieDbApi.
*/
@Test
public void testSearchPeople() throws MovieDbException {
@@ -285,7 +299,7 @@ public class TheMovieDbTest {
}
/**
* Test of getPersonInfo method, of class TheMovieDb.
* Test of getPersonInfo method, of class TheMovieDbApi.
*/
@Test
public void testGetPersonInfo() throws MovieDbException {
@@ -295,7 +309,7 @@ public class TheMovieDbTest {
}
/**
* Test of getPersonCredits method, of class TheMovieDb.
* Test of getPersonCredits method, of class TheMovieDbApi.
*/
@Test
public void testGetPersonCredits() throws MovieDbException {
@@ -306,7 +320,7 @@ public class TheMovieDbTest {
}
/**
* Test of getPersonImages method, of class TheMovieDb.
* Test of getPersonImages method, of class TheMovieDbApi.
*/
@Test
public void testGetPersonImages() throws MovieDbException {
@@ -317,7 +331,7 @@ public class TheMovieDbTest {
}
/**
* Test of getLatestMovie method, of class TheMovieDb.
* Test of getLatestMovie method, of class TheMovieDbApi.
*/
@Test
public void testGetLatestMovie() throws MovieDbException {
@@ -328,7 +342,7 @@ public class TheMovieDbTest {
}
/**
* Test of compareMovies method, of class TheMovieDb.
* Test of compareMovies method, of class TheMovieDbApi.
*/
@Test
public void testCompareMovies() {
@@ -336,7 +350,7 @@ public class TheMovieDbTest {
}
/**
* Test of setProxy method, of class TheMovieDb.
* Test of setProxy method, of class TheMovieDbApi.
*/
@Test
public void testSetProxy() {
@@ -344,7 +358,7 @@ public class TheMovieDbTest {
}
/**
* Test of setTimeout method, of class TheMovieDb.
* Test of setTimeout method, of class TheMovieDbApi.
*/
@Test
public void testSetTimeout() {
@@ -352,7 +366,7 @@ public class TheMovieDbTest {
}
/**
* Test of getNowPlayingMovies method, of class TheMovieDb.
* Test of getNowPlayingMovies method, of class TheMovieDbApi.
*/
@Test
public void testGetNowPlayingMovies() throws MovieDbException {
@@ -362,7 +376,7 @@ public class TheMovieDbTest {
}
/**
* Test of getPopularMovieList method, of class TheMovieDb.
* Test of getPopularMovieList method, of class TheMovieDbApi.
*/
@Test
public void testGetPopularMovieList() throws MovieDbException {
@@ -372,7 +386,7 @@ public class TheMovieDbTest {
}
/**
* Test of getTopRatedMovies method, of class TheMovieDb.
* Test of getTopRatedMovies method, of class TheMovieDbApi.
*/
@Test
public void testGetTopRatedMovies() throws MovieDbException {
@@ -382,7 +396,7 @@ public class TheMovieDbTest {
}
/**
* Test of getCompanyInfo method, of class TheMovieDb.
* Test of getCompanyInfo method, of class TheMovieDbApi.
*/
@Test
public void testGetCompanyInfo() throws MovieDbException {
@@ -392,7 +406,7 @@ public class TheMovieDbTest {
}
/**
* Test of getCompanyMovies method, of class TheMovieDb.
* Test of getCompanyMovies method, of class TheMovieDbApi.
*/
@Test
public void testGetCompanyMovies() throws MovieDbException {
@@ -402,7 +416,7 @@ public class TheMovieDbTest {
}
/**
* Test of searchCompanies method, of class TheMovieDb.
* Test of searchCompanies method, of class TheMovieDbApi.
*/
@Test
public void testSearchCompanies() throws MovieDbException {
@@ -412,7 +426,7 @@ public class TheMovieDbTest {
}
/**
* Test of getSimilarMovies method, of class TheMovieDb.
* Test of getSimilarMovies method, of class TheMovieDbApi.
*/
@Test
public void testGetSimilarMovies() throws MovieDbException {
@@ -422,7 +436,7 @@ public class TheMovieDbTest {
}
/**
* Test of getGenreList method, of class TheMovieDb.
* Test of getGenreList method, of class TheMovieDbApi.
*/
@Test
public void testGetGenreList() throws MovieDbException {
@@ -432,7 +446,7 @@ public class TheMovieDbTest {
}
/**
* Test of getGenreMovies method, of class TheMovieDb.
* Test of getGenreMovies method, of class TheMovieDbApi.
*/
@Test
public void testGetGenreMovies() throws MovieDbException {
@@ -442,7 +456,7 @@ public class TheMovieDbTest {
}
/**
* Test of getUpcoming method, of class TheMovieDb.
* Test of getUpcoming method, of class TheMovieDbApi.
*/
@Test
public void testGetUpcoming() throws Exception {
@@ -452,7 +466,7 @@ public class TheMovieDbTest {
}
/**
* Test of getCollectionImages method, of class TheMovieDb.
* Test of getCollectionImages method, of class TheMovieDbApi.
*/
@Test
public void testGetCollectionImages() throws Exception {
@@ -463,7 +477,7 @@ public class TheMovieDbTest {
}
/**
* Test of getAuthorisationToken method, of class TheMovieDb.
* Test of getAuthorisationToken method, of class TheMovieDbApi.
*/
// @Test
public void testGetAuthorisationToken() throws Exception {
@@ -475,7 +489,7 @@ public class TheMovieDbTest {
}
/**
* Test of getSessionToken method, of class TheMovieDb.
* Test of getSessionToken method, of class TheMovieDbApi.
*/
// @Test
public void testGetSessionToken() throws Exception {