예제 #1
0
  @Test
  public void getHtmlContentAndSaveToFile() {

    HtmlService htmlService = new HtmlService();

    String urlToConvert = "http://jessewarden.com/2008/11/agile-chronicles-1-stressful.html";

    String htmlContent = htmlService.getHtmlContent(urlToConvert);

    File file =
        htmlService.saveHtmlContentToFile(
            htmlContent, sharedServices.getContentFolder(), "ebookContent");

    Assert.assertTrue(file.exists());
  }
예제 #2
0
  @Test
  public void getHtmlContentTest() {

    String urlToConvert = "http://jessewarden.com/2008/11/agile-chronicles-1-stressful.html";

    String htmlToConvert = htmlService.getHtmlContent(urlToConvert);

    Assert.assertTrue(!htmlToConvert.isEmpty());
  }