Exemplo n.º 1
0
  @Test
  public void getMovieLinks() {
    Movie movie = _movieService.getMovieById(3873); // The Revenant
    assertNotNull(movie);
    Set<MovieLink> movieLinks = movie.getMovieLinks();
    assertTrue(CollectionUtils.isNotEmpty(movieLinks));
    assertEquals(1, movieLinks.size());

    movie = _movieService.getMovieById(3916); // The Man in the Wilderness
    assertNotNull(movie);
    movieLinks = movie.getMovieLinks();
    assertTrue(CollectionUtils.isNotEmpty(movieLinks));
    assertEquals(1, movieLinks.size());
  }
Exemplo n.º 2
0
 @Test
 public void getMovieById() {
   Movie movie = _movieService.getMovieById(1548); // Star Wars
   Set<Tag> tags = movie.getTags();
   assertNotNull("Tag set is unexpectedly null", tags);
   assertEquals("Number of tags", 5, tags.size());
   Set<MovieCrewPerson> movieCrewPersons = movie.getMovieCrewPersons();
   assertNotNull("MovieCrewPerson set is unexpectedly null", movieCrewPersons);
   assertEquals("Number of crew persons", 3, movieCrewPersons.size());
   Set<MovieOscar> movieOscars = movie.getMovieOscars();
   assertNotNull("MovieOscar set is unexpectedly null", movieOscars);
   assertEquals("Number of oscars", 4, movieOscars.size());
   Set<MovieTyler> movieTylers = movie.getMovieTylers();
   assertTrue("MovieTyler set unexpectedly not empty", CollectionUtils.isEmpty(movieTylers));
   Set<ListMovie> listMovies = movie.getListMovies();
   assertNotNull("ListMovie set unexpectedly null", listMovies);
   assertEquals("Number of lists", 1, listMovies.size());
   Set<MovieLink> movieLinks = movie.getMovieLinks();
   assertTrue("Movie-links-from set unexpectedly not empty", CollectionUtils.isEmpty(movieLinks));
   Set<MovieSequenceMovie> sequenceMovies = movie.getMovieSequenceMovies();
   assertNotNull("MovieSequenceMovie set is unexpectedly null", sequenceMovies);
   assertEquals("Number of sequences", 2, sequenceMovies.size());
   Movie parent = movie.getParent();
   assertNull("Parent movie unexpectedly not null", parent);
   Set<Movie> children = movie.getChildren();
   assertTrue("Child movies set unexpectedly not empty", CollectionUtils.isEmpty(children));
 }