/** * The test class PlayListTest. * * @author (your name) * @version (a version number or a date) */ public class PlayListTest extends junit.framework.TestCase { private PlayList playList1; private PlayList singleton; private PlayList justTwo; /** * Default constructor for test class PlayListTest */ public PlayListTest() { } /** * Sets up the test fixture. * * Called before every test case method. */ protected void setUp() { playList1 = new PlayList(); singleton = new PlayList(); justTwo = new PlayList(); } /** * Tears down the test fixture. * * Called after every test case method. */ protected void tearDown() { } public void testTotalTime() { assertEquals(0, playList1.totalTime()); assertEquals(120, singleton.totalTime()); assertEquals(423, justTwo.totalTime()); } }