예제 #1
0
  /**
   * Test of Append_To_Response method, of class TmdbTV.
   *
   * @throws com.omertron.themoviedbapi.MovieDbException
   */
  @Test
  public void testAppendToResponse() throws MovieDbException {
    LOG.info("appendToResponse");

    String language = LANGUAGE_DEFAULT;
    String appendToResponse = appendToResponseBuilder(TVMethod.class);

    for (TestID test : TV_IDS) {
      // Just test Waling Dead
      if (test.getTmdb() != 1402) {
        continue;
      }

      TVInfo result = instance.getTVInfo(test.getTmdb(), language, appendToResponse);
      TestSuite.test(result);
      TestSuite.testATR(result, TVMethod.class, null);
      TestSuite.test(result.getAlternativeTitles(), "Alt titles");
      TestSuite.test(result.getContentRatings(), "Content Ratings");
      TestSuite.test(result.getCredits());
      TestSuite.test(result.getExternalIDs());
      TestSuite.test(result.getImages(), "Images");
      TestSuite.test(result.getKeywords(), "Keywords");
      TestSuite.test(result.getVideos(), "Videos");
      TestSuite.test(result.getTranslations(), "Translations");
      TestSuite.test(result.getSimilarTV(), "Similar");
      // There are rarely any changes, so skip this test
    }
  }
예제 #2
0
  /**
   * Test of getLatestTV method, of class TmdbTV.
   *
   * @throws com.omertron.themoviedbapi.MovieDbException
   */
  @Test
  public void testGetTVLatest() throws MovieDbException {
    LOG.info("getTVLatest");

    TVInfo result = instance.getLatestTV();
    assertTrue("Missing ID", result.getId() > 0);
    assertTrue("Missing Name", StringUtils.isNotBlank(result.getName()));
  }