Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1.     public void testAddSongToSequentialPlay() {
  2.         Song dopeSong = new Song("Dope dooped", "Crazy Js", 420, album);
  3.        
  4.         playlist.set_current(0);    //Set at 0
  5.         playlist.startFrom(3);
  6.         for(int n = playlist.get_current(); !playlist.is_done(); n++){
  7.             assertEquals(playlist.is_done(), false); //Is playlist done?
  8.             assertEquals(playlist.get_current(), n); //
  9.             if(n == 1)
  10.             {
  11.                 playlist.addSong(dopeSong);
  12.             }
  13.             System.out.print("Current: " + playlist.get_current() + newLine);
  14.             System.out.print("What is left: " + playlist.left() + newLine);
  15.             System.out.print("Index:" + n + newLine);
  16.             assertEquals(album.get(n), playlist.playSong());
  17.             assertEquals(playlist.get_current(), n + 1);
  18.         }
  19.         //assertEquals(, dopeSong);
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement