Beispiel #1
0
  @Test
  public void testUpdateMediaInfoCast02() {
    Movie movie = new Movie();
    movie.setId(FilmwebPlugin.FILMWEB_PLUGIN_ID, "http://www.filmweb.pl/film/Agenci-2013-612342");
    filmwebPlugin.setRequestResult(null); // no offline test
    filmwebPlugin.updateMediaInfo(movie, movie.getId(FilmwebPlugin.FILMWEB_PLUGIN_ID));

    LinkedHashSet<String> testCast = new LinkedHashSet<>();
    // These need to be in the same order as the web page
    testCast.add("Denzel Washington");
    testCast.add("Mark Wahlberg");

    assertEquals(
        Arrays.asList(testCast.toArray()).toString(),
        Arrays.asList(Arrays.copyOf(movie.getCast().toArray(), 2)).toString());
  }
Beispiel #2
0
  @Test
  public void testUpdateMediaInfoCast01() {
    Movie movie = new Movie();
    movie.setId(FilmwebPlugin.FILMWEB_PLUGIN_ID, "http://www.filmweb.pl/Avatar");
    filmwebPlugin.setRequestResult(null); // no offline test
    filmwebPlugin.updateMediaInfo(movie, movie.getId(FilmwebPlugin.FILMWEB_PLUGIN_ID));

    LinkedHashSet<String> testCast = new LinkedHashSet<>();
    // These need to be in the same order as the web page
    testCast.add("Sam Worthington");
    testCast.add("Zoe Saldana");

    assertEquals(
        Arrays.asList(testCast.toArray()).toString(),
        Arrays.asList(Arrays.copyOf(movie.getCast().toArray(), 2)).toString());
  }