Exemple #1
0
 /** tests the getPodcastById functionality */
 public void testGetPodcastById() {
   PodcastDAOImpl pdao = PodcastDAOImpl.i(this.mContext);
   p1.setTitle("expected title");
   p1 = pdao.insertPodcast(p1);
   Podcast pod = pdao.getPodcastById(p1.getId());
   assertEquals("expected title", pod.getTitle());
   assertEquals(p1.getLastUpdate(), pod.getLastUpdate());
   assertEquals(p1.hashCode(), pod.hashCode());
 }
Exemple #2
0
 /** tests the updateLastUpdate functionality */
 public void testUpdateLastUpdate() {
   PodcastDAOImpl pdao = PodcastDAOImpl.i(this.mContext);
   p1 = pdao.insertPodcast(p1);
   long currentMilis = System.currentTimeMillis();
   p1.setLastUpdate(currentMilis);
   assertEquals(1, pdao.updateLastUpdate(p1));
   Podcast pod = pdao.getPodcastById(p1.getId());
   assertEquals(currentMilis, pod.getLastUpdate());
 }