Пример #1
0
  /**
   * Test of getTVCredits method, of class TmdbTV.
   *
   * @throws com.omertron.themoviedbapi.MovieDbException
   */
  @Test
  public void testGetTVCredits() throws MovieDbException {
    LOG.info("getTVCredits");

    for (TestID test : TV_IDS) {
      MediaCreditList result = instance.getTVCredits(test.getTmdb(), LANGUAGE_DEFAULT);
      assertNotNull(result);
      assertFalse(result.getCast().isEmpty());

      boolean found = false;
      for (MediaCreditCast p : result.getCast()) {
        if (test.getOther().equals(p.getName())) {
          found = true;
          break;
        }
      }
      assertTrue(test.getOther() + " not found in cast!", found);

      // Only breaking bad has crew
      if (test.getTmdb() == 1396) {
        assertFalse(result.getCrew().isEmpty());
      }
      break;
    }
  }