/** * Test method for {@link * com.coship.sdp.sce.dp.news.service.impl.DpNewsServiceImpl#deleteDpNews(com.coship.sdp.sce.dp.news.entity.DpNews)} * . */ @Test public void testDeleteDpNews() { DpNews dpNews = new DpNews(); dpNews.setId("3"); try { this.dpNewsService.deleteDpNews(dpNews); } catch (Exception e) { Assert.fail(e.getMessage()); } }
/** * Test method for {@link * com.coship.sdp.sce.dp.news.service.impl.DpNewsServiceImpl#updateDpNews(com.coship.sdp.sce.dp.news.entity.DpNews)} * . * * @throws Exception */ @Test public void testUpdateDpNews() throws Exception { DpNews dn = new DpNews(); dn.setId("1"); String newsTitle = "iOS"; dn.setNewsTitle(newsTitle); this.dpNewsService.updateDpNews(dn); Assert.assertEquals(newsTitle, dn.getNewsTitle()); }