/**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeAlbumList(java.lang.String,
  * ext.services.lastfm.AlbumListInfo)} .
  */
 public void testStoreAlbumList() {
   LastFmCache cache = new LastFmCache();
   LastFmAlbumList list = new LastFmAlbumList();
   LastFmAlbum album1 = new LastFmAlbum();
   album1.setTitle("Test1");
   LastFmAlbum album2 = new LastFmAlbum();
   album2.setTitle("Test2");
   List<AlbumInfo> alist = new ArrayList<AlbumInfo>();
   alist.add(album1);
   alist.add(album2);
   list.setAlbums(alist);
   cache.storeAlbumList("Red Hot Chili Peppers", list);
   assertNotNull(cache.retrieveAlbumList("Red Hot Chili Peppers"));
   assertNotNull(cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums());
   assertEquals(
       cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums().toString(),
       2,
       cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums().size());
   /*
    * assertTrue(cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums().toString
    * (),
    * cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums().contains(
    * album1));
    * assertTrue(cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums
    * ().toString(),
    * cache.retrieveAlbumList("Red Hot Chili Peppers").getAlbums(
    * ).contains(album2));
    */
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeAlbumInfo(java.lang.String, java.lang.String,
  * ext.services.lastfm.AlbumInfo)} .
  */
 public void testStoreAlbumInfo() {
   LastFmCache cache = new LastFmCache();
   LastFmAlbum album = new LastFmAlbum();
   album.setBigCoverURL("testurl");
   cache.storeAlbumInfo("Red Hot Chili Peppers", "By the way", album);
   assertNotNull(cache.retrieveAlbumInfo("Red Hot Chili Peppers", "By the way"));
 }
 /*
  * (non-Javadoc)
  *
  * @see junit.framework.TestCase#setUp()
  */
 @Override
 protected void setUp() throws Exception {
   // make sure the cache is cleaned up front to not find items from previous
   // runs
   LastFmCache cache = new LastFmCache();
   cache.clearCache();
   super.setUp();
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeArtistThumbImage(ext.services.lastfm.ArtistInfo,
  * java.awt.Image)} .
  */
 public void testStoreArtistThumbImage() {
   LastFmCache cache = new LastFmCache();
   LastFmArtist artist = new LastFmArtist();
   artist.setName("Red Hot Chili Peppers");
   Image cover = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
   cache.storeArtistThumbImage(artist, cover);
   assertNotNull(cache.retrieveArtistThumbImage(artist));
   assertEquals(10, cache.retrieveArtistThumbImage(artist).getHeight(null));
 }
 /**
  * Test method for.
  *
  * <p>{@link
  * ext.services.lastfm.LastFmCache#storeArtistImage(ext.services.lastfm.SimilarArtistsInfo,
  * java.awt.Image)} .
  */
 public void testStoreArtistImage() {
   LastFmCache cache = new LastFmCache();
   LastFmSimilarArtists artists = new LastFmSimilarArtists();
   artists.setArtistName("Red Hot Chili Peppers");
   Image cover = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
   cache.storeArtistImage(artists, cover);
   assertNotNull(cache.retrieveArtistImage(artists));
   assertEquals(10, cache.retrieveArtistImage(artists).getHeight(null));
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeArtistInfo(java.lang.String,
  * ext.services.lastfm.ArtistInfo)} .
  */
 public void testStoreArtistInfo() {
   LastFmCache cache = new LastFmCache();
   LastFmArtist artist = new LastFmArtist();
   artist.setName("Red Hot Chili Peppers");
   cache.storeArtistInfo("Red Hot Chili Peppers", artist);
   assertNotNull(cache.retrieveArtistInfo("Red Hot Chili Peppers"));
   assertEquals(
       "Red Hot Chili Peppers", cache.retrieveArtistInfo("Red Hot Chili Peppers").getName());
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeAlbumCover(ext.services.lastfm.AlbumInfo,
  * java.awt.Image)} .
  */
 public void testStoreAlbumCover() {
   LastFmCache cache = new LastFmCache();
   LastFmAlbum album = new LastFmAlbum();
   album.setBigCoverURL("testurl");
   Image cover = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
   cache.storeAlbumCover(album, cover);
   assertNotNull(cache.retrieveAlbumCover(album));
   assertEquals(10, cache.retrieveAlbumCover(album).getHeight(null));
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeArtistSimilar(java.lang.String,
  * ext.services.lastfm.SimilarArtistsInfo)} .
  */
 public void testStoreArtistSimilar() {
   LastFmCache cache = new LastFmCache();
   LastFmSimilarArtists artists = new LastFmSimilarArtists();
   artists.setArtistName("Hed Rot Phili Ceppers");
   cache.storeArtistSimilar("Red Hot Chili Peppers", artists);
   assertNotNull(cache.retrieveArtistSimilar("Red Hot Chili Peppers"));
   assertEquals(
       "Hed Rot Phili Ceppers",
       cache.retrieveArtistSimilar("Red Hot Chili Peppers").getArtistName());
 }
 /**
  * Test method for.
  *
  * <p>{@link
  * ext.services.lastfm.LastFmCache#retrieveArtistImage(ext.services.lastfm.SimilarArtistsInfo)} .
  */
 public void testRetrieveArtistImage() {
   LastFmCache cache = new LastFmCache();
   LastFmSimilarArtists artists = new LastFmSimilarArtists();
   artists.setArtistName("Red Hot Chili Peppers");
   assertNull(cache.retrieveArtistImage(artists));
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#retrieveArtistInfo(java.lang.String)} .
  */
 public void testRetrieveArtistInfo() {
   LastFmCache cache = new LastFmCache();
   assertNull(cache.retrieveArtistInfo("Red Hot Chili Peppers"));
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#retrieveAlbumInfo(java.lang.String,
  * java.lang.String)} .
  */
 public void testRetrieveAlbumInfo() {
   LastFmCache cache = new LastFmCache();
   assertNull(cache.retrieveAlbumInfo("Red Hot Chili Peppers", "By the way"));
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#retrieveAlbumCover(ext.services.lastfm.AlbumInfo)} .
  */
 public void testRetrieveAlbumCover() {
   LastFmCache cache = new LastFmCache();
   LastFmAlbum album = new LastFmAlbum();
   album.setBigCoverURL("testurl");
   assertNull(cache.retrieveAlbumCover(album));
 }
 /** Test method for {@link ext.services.lastfm.LastFmCache#clearCache()}. */
 public void testClearCache() {
   LastFmCache cache = new LastFmCache();
   cache.clearCache();
 }
 /**
  * Test method for.
  *
  * <p>{@link
  * ext.services.lastfm.LastFmCache#addSubmissionData(ext.services.lastfm.FullSubmissionData)} .
  */
 public void testAddSubmissionData() {
   LastFmCache cache = new LastFmCache();
   FullSubmissionData data =
       new FullSubmissionData("Red Hot Chili Peppers", "title", "By The Way", 10, 1, "Source", 10);
   cache.addSubmissionData(data);
 }
 /**
  * Test method for.
  *
  * <p>{@link ext.services.lastfm.LastFmCache#storeArtistWiki(java.lang.String, java.lang.String)}
  * .
  */
 public void testStoreArtistWiki() {
   LastFmCache cache = new LastFmCache();
   cache.storeArtistWiki("Red Hot Chili Peppers", "TestWikiText");
   assertNotNull(cache.retrieveArtistWiki("Red Hot Chili Peppers"));
   assertEquals("TestWikiText", cache.retrieveArtistWiki("Red Hot Chili Peppers"));
 }
 /**
  * Test method for.
  *
  * <p>{@link
  * ext.services.lastfm.LastFmCache#retrieveArtistThumbImage(ext.services.lastfm.ArtistInfo)} .
  */
 public void testRetrieveArtistThumbImage() {
   LastFmCache cache = new LastFmCache();
   LastFmArtist artist = new LastFmArtist();
   artist.setName("Red Hot Chili Peppers");
   assertNull(cache.retrieveArtistThumbImage(artist));
 }