@Test public void removeTest() { Video v1 = videos.add("name", 80); Video v2 = videos.add("chapter1", 10); videos.add("test", 40); assertEquals(3, videos.list.size()); videos.remove("name"); assertEquals(2, videos.list.size()); assertFalse(videos.list.contains(v1)); assertTrue(videos.list.contains(v2)); }
public void remove(String mediaLabel) { int index = searchVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } }
Videos { public void remove(String mediaLabel) { int index = searchVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } }
Videos { public void remove(String mediaLabel) { int index = searchVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Videos(MediaPlayer player); }
Videos { public void remove(String mediaLabel) { int index = searchVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Videos(MediaPlayer player); Video add(String mediaLabel, int duration); Video add(String mediaLabel, String mediaTheme1, int duration); Video add(String mediaLabel, String mediaTheme1, String mediaTheme2, int duration); Video add(String mediaLabel, String mediaTheme1, String mediaTheme2, String mediaTheme3, int duration); void remove(String mediaLabel); void removeAll(); }
Videos { public void remove(String mediaLabel) { int index = searchVideoIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Videos(MediaPlayer player); Video add(String mediaLabel, int duration); Video add(String mediaLabel, String mediaTheme1, int duration); Video add(String mediaLabel, String mediaTheme1, String mediaTheme2, int duration); Video add(String mediaLabel, String mediaTheme1, String mediaTheme2, String mediaTheme3, int duration); void remove(String mediaLabel); void removeAll();  }