/** * 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#retrieveAlbumList(java.lang.String)} . */ public void testRetrieveAlbumList() { LastFmCache cache = new LastFmCache(); assertNull(cache.retrieveAlbumList("Red Hot Chili Peppers")); }