Question: Write three different JUnit tests: @Test public void testAdd() { System.out.println(add); Object element = null; Playlist instance = new Playlist(); boolean expResult = false; boolean

Write three different JUnit tests:

@Test public void testAdd() { System.out.println("add"); Object element = null; Playlist instance = new Playlist(); boolean expResult = false; boolean result = instance.add(element); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }

/** * Test of remove method, of class Playlist. */ @Test public void testRemove() { System.out.println("remove"); Object element = null; Playlist instance = new Playlist(); boolean expResult = false; boolean result = instance.remove(element); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }

@Test public void testPlay() { System.out.println("play"); int index = 0; Playlist instance = new Playlist(); Object expResult = null; Object result = instance.play(index); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!