/** tests the updateLogoFilePath functionality */ public void testUpdateLogoFilePath() { PodcastDAOImpl pdao = PodcastDAOImpl.i(this.mContext); p1 = pdao.insertPodcast(p1); String newFilePath = "new path haha"; p1.setLogoFilePath(newFilePath); assertEquals(1, pdao.updateLogoFilePath(p1)); Podcast pod = pdao.getPodcastById(p1.getId()); assertEquals(newFilePath, pod.getLogoFilePath()); }
@Override protected void setUp() throws Exception { p1 = new Podcast(); p1.setDescription("description"); p1.setLastUpdate(111); p1.setLogoFilePath("logoFilePath"); p1.setLogoUrl("logoUrl"); p1.setTitle("title"); p1.setUrl("url"); super.setUp(); }
/** tests insert podcast functionality with inserting null on a nullable column */ public void testInsertNullOnNullableColumn() { PodcastDAOImpl pdao = PodcastDAOImpl.i(this.mContext); p1.setLogoFilePath(null); Podcast pod = pdao.insertPodcast(p1); assertNotNull(pod); }