Esempio n. 1
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));
 }
Esempio n. 2
0
 @Test
 public void getMovieCrewPersons() {
   Movie movie = _movieService.getMovieById(1548); // Star Wars
   assertNotNull(movie);
   Set<MovieCrewPerson> movieCrewPersons = movie.getMovieCrewPersons();
   assertTrue(CollectionUtils.isNotEmpty(movieCrewPersons));
   assertEquals(3, movieCrewPersons.size());
 }