// @Test public void testUpdateMediaInfoTitle02() { Movie movie = new Movie(); movie.setId(FilmwebPlugin.FILMWEB_PLUGIN_ID, "http://www.filmweb.pl/John.Rambo"); filmwebPlugin.setRequestResult( "<title>John Rambo (2008) - Filmweb</title><meta property=\"og:title\" content=\"John Rambo / Rambo\">"); filmwebPlugin.updateMediaInfo(movie, movie.getId(FilmwebPlugin.FILMWEB_PLUGIN_ID)); assertEquals("John Rambo", movie.getTitle()); assertEquals("Rambo", movie.getOriginalTitle()); }
@Test public void testUpdateMediaInfoTitle01() { Movie movie = new Movie(); movie.setId(FilmwebPlugin.FILMWEB_PLUGIN_ID, "http://www.filmweb.pl/Seksmisja"); filmwebPlugin.setRequestResult("<title>Seksmisja (1984) - Film - FILMWEB.pl</title>"); filmwebPlugin.updateMediaInfo(movie, movie.getId(FilmwebPlugin.FILMWEB_PLUGIN_ID)); assertEquals("Seksmisja", movie.getTitle()); assertEquals("Seksmisja", movie.getOriginalTitle()); }
@Test public void testUpdateMediaInfoTitleWithOriginalTitle() { Movie movie = new Movie(); movie.setId(FilmwebPlugin.FILMWEB_PLUGIN_ID, "http://www.filmweb.pl/Ojciec.Chrzestny"); filmwebPlugin.setRequestResult( "<title>Ojciec chrzestny (1972) - Filmweb</title><meta property=\"og:title\" content=\"Ojciec chrzestny / Godfather, The\">"); filmwebPlugin.updateMediaInfo(movie, movie.getId(FilmwebPlugin.FILMWEB_PLUGIN_ID)); assertEquals("Ojciec chrzestny", movie.getTitle()); assertEquals("The Godfather", movie.getOriginalTitle()); }