Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void testAddSongToSequentialPlay() {
- Song dopeSong = new Song("Dope dooped", "Crazy Js", 420, album);
- playlist.set_current(0); //Set at 0
- playlist.startFrom(3);
- for(int n = playlist.get_current(); !playlist.is_done(); n++){
- assertEquals(playlist.is_done(), false); //Is playlist done?
- assertEquals(playlist.get_current(), n); //
- if(n == 1)
- {
- playlist.addSong(dopeSong);
- }
- System.out.print("Current: " + playlist.get_current() + newLine);
- System.out.print("What is left: " + playlist.left() + newLine);
- System.out.print("Index:" + n + newLine);
- assertEquals(album.get(n), playlist.playSong());
- assertEquals(playlist.get_current(), n + 1);
- }
- //assertEquals(, dopeSong);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement