@Test public void testWrongHTML() { String html = "<html></html>"; Document doc = Jsoup.parse(html); OnetArticleParser articleParser = new OnetArticleParser(); IArticle article = articleParser.parseDocument(doc); assertNull(article); }
@Test public void testNullDocuments() { OnetArticleParser articleParser = new OnetArticleParser(); IArticle article = articleParser.parseDocument(null); assertNull(article); }
private IArticle getExampleDoc() { Document doc = getExampleDocument(); OnetArticleParser articleParser = new OnetArticleParser(); IArticle article = articleParser.parseDocument(doc); return article; }