/** Tests the addArticle function */ public void testAddArticle() { Newsletter newsletter = new Newsletter("BFH Newsletter", "blablabla", 6); Article article = newsletter.addArticle("NewsletterArticle", "The newsletter project is really funny ;)"); assertTrue("NewsletterArticle".equals(newsletter.getArticle(article.getId()).getTitle())); }
/** Tests the getArticle function */ public void testGetArticle() { Newsletter newsletter = new Newsletter("BFH Newsletter", "blablabla", 6); Article article1 = newsletter.addArticle("Article 1", "The newsletter project is really funny ;)"); assertTrue(article1.equals(newsletter.getArticle(article1.getId()))); }