Example #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());
 }
Example #2
0
  @Override
  public void onPodcastDeleted(final Podcast podcast) {
    Log.v(TAG, String.format("onPodcastDeleted: %s", podcast.getTitle()));
    Activity activity = getActivity();
    if (activity == null) {
      return;
    }

    activity.runOnUiThread(
        new Runnable() {
          @Override
          public void run() {
            model.removePodcast(podcast);
          }
        });
    updatePodcastList();
  }
Example #3
0
 @Override
 public void onPodcastChanged(Podcast podcast) {
   Log.v(TAG, String.format("onPodcastChanged: %s", podcast.getTitle()));
   updatePodcastList();
 }