* update test cases
This commit is contained in:
parent
aa9b407fee
commit
a2493bc969
|
@ -159,6 +159,10 @@ public class SublightSubtitleClient implements SubtitleProvider, VideoHashSubtit
|
|||
Collections.addAll(languages.getSubtitleLanguage(), SubtitleLanguage.values());
|
||||
}
|
||||
|
||||
// hash singleton array
|
||||
ArrayOfString videoHashes = new ArrayOfString();
|
||||
videoHashes.getString().add(videoHash);
|
||||
|
||||
// all genres
|
||||
ArrayOfGenre genres = new ArrayOfGenre();
|
||||
Collections.addAll(genres.getGenre(), Genre.values());
|
||||
|
@ -168,7 +172,7 @@ public class SublightSubtitleClient implements SubtitleProvider, VideoHashSubtit
|
|||
Holder<ArrayOfRelease> releases = new Holder<ArrayOfRelease>();
|
||||
Holder<String> error = new Holder<String>();
|
||||
|
||||
webservice.searchSubtitles3(session, videoHash, name, year, null, null, languages, genres, null, null, null, subtitles, releases, null, error);
|
||||
webservice.searchSubtitles4(session, videoHashes, name, year, null, null, languages, genres, null, null, null, subtitles, releases, null, error);
|
||||
|
||||
// abort if something went wrong
|
||||
checkError(error);
|
||||
|
|
|
@ -33,12 +33,12 @@ public class SubRipReaderTest {
|
|||
reader.close();
|
||||
}
|
||||
|
||||
assertEquals(501, list.size(), 0);
|
||||
assertEquals(499, list.size(), 0);
|
||||
|
||||
assertEquals(3455, list.get(0).getStart(), 0);
|
||||
assertEquals(6799, list.get(0).getEnd(), 0);
|
||||
|
||||
assertEquals("Come with me if you want to live.", list.get(254).getText());
|
||||
assertEquals("Come with me if you want to live.", list.get(253).getText());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public class IMDbClientTest {
|
|||
|
||||
Episode first = list.get(0);
|
||||
|
||||
assertEquals("Mushishi", first.getSeriesName());
|
||||
assertEquals("Mushi-Shi", first.getSeriesName());
|
||||
assertEquals("Midori no za", first.getTitle());
|
||||
assertEquals("1", first.getEpisode().toString());
|
||||
assertEquals("1", first.getSeason().toString());
|
||||
|
|
|
@ -182,7 +182,7 @@ public class OpenSubtitlesXmlRpcTest {
|
|||
ByteBuffer data = list.get(0).fetch();
|
||||
|
||||
// check size
|
||||
assertEquals(48707, data.remaining(), 0);
|
||||
assertEquals(48550, data.remaining(), 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ public class SublightSubtitleClientTest {
|
|||
|
||||
SubtitleDescriptor sample = list.get(0);
|
||||
|
||||
assertEquals("Terminator.2.Judgment.Day(1991)", sample.getName());
|
||||
assertEquals("English", sample.getLanguageName());
|
||||
assertEquals("Terminator.2.1991.ULTIMATE.EDITION.DC.DVDXvID.AC3.CDx-HLS", sample.getName());
|
||||
assertEquals("Slovenian", sample.getLanguageName());
|
||||
|
||||
// check size
|
||||
assertTrue(list.size() > 15);
|
||||
|
|
|
@ -17,12 +17,12 @@ public class TMDbClientTest {
|
|||
|
||||
@Test
|
||||
public void searchByName() throws Exception {
|
||||
List<MovieDescriptor> result = tmdb.searchMovie("Transformers");
|
||||
MovieDescriptor movie = result.get(1);
|
||||
List<MovieDescriptor> result = tmdb.searchMovie("Serenity");
|
||||
MovieDescriptor movie = result.get(0);
|
||||
|
||||
assertEquals("Transformers", movie.getName());
|
||||
assertEquals(2007, movie.getYear());
|
||||
assertEquals(418279, movie.getImdbId());
|
||||
assertEquals("Serenity", movie.getName());
|
||||
assertEquals(2005, movie.getYear());
|
||||
assertEquals(379786, movie.getImdbId());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue