Tidy up of test cases

This commit is contained in:
Stuart Boston
2015-02-18 10:19:26 +00:00
parent ba64e339b1
commit af2d8400fc
26 changed files with 231 additions and 687 deletions
@@ -21,14 +21,12 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.TestLogger;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;
import com.omertron.themoviedbapi.model.MovieList;
import com.omertron.themoviedbapi.model.person.PersonMovieOld;
import com.omertron.themoviedbapi.model.tv.TVSeriesBasic;
import com.omertron.themoviedbapi.model.Person;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;
@@ -51,7 +49,7 @@ public class TmdbSearchTest extends AbstractTests {
@BeforeClass
public static void setUpClass() throws MovieDbException {
TestLogger.Configure();
doConfiguration();
instance = new TmdbSearch(getApiKey(), getHttpTools());
}
@@ -82,18 +80,6 @@ public class TmdbSearchTest extends AbstractTests {
assertTrue("Not enough movies found, should be over 15, found " + movieList.getResults().size(), movieList.getResults().size() >= 15);
}
/**
* Test of searchTv method, of class TmdbSearch.
*
* @throws MovieDbException
*/
@Test
public void testSearchTv() throws MovieDbException {
LOG.info("searchTv");
TmdbResultsList<TVSeriesBasic> results = instance.searchTv("Big Bang Theory", 0, LANGUAGE_DEFAULT, null, 0);
assertFalse("No shows found, should be at least 1", results.getResults().isEmpty());
}
/**
* Test of searchCollection method, of class TheMovieDbApi.
*
@@ -119,7 +105,7 @@ public class TmdbSearchTest extends AbstractTests {
LOG.info("searchPeople");
String personName = "Bruce Willis";
boolean includeAdult = false;
TmdbResultsList<PersonMovieOld> result = instance.searchPeople(personName, includeAdult, 0);
TmdbResultsList<Person> result = instance.searchPeople(personName, includeAdult, 0);
assertTrue("Couldn't find the person", result.getResults().size() > 0);
}