@Test public void removeTest() { Audio a1 = audios.add("name", 80); Audio a2 = audios.add("test", 10); audios.add("test2", 40); assertEquals(3, audios.list.size()); audios.remove("name"); assertEquals(2, audios.list.size()); assertFalse(audios.list.contains(a1)); assertTrue(audios.list.contains(a2)); }
public void remove(String mediaLabel) { int index = searchAudioIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } }
Audios { public void remove(String mediaLabel) { int index = searchAudioIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } }
Audios { public void remove(String mediaLabel) { int index = searchAudioIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Audios(MediaPlayer player); }
Audios { public void remove(String mediaLabel) { int index = searchAudioIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Audios(MediaPlayer player); Audio add(String mediaLabel, int duration); Audio add(String mediaLabel, String mediaTheme1, int duration); Audio add(String mediaLabel, String mediaTheme1, String mediaTheme2, int duration); Audio add(String mediaLabel, String mediaTheme1, String mediaTheme2, String mediaTheme3, int duration); void remove(String mediaLabel); void removeAll(); }
Audios { public void remove(String mediaLabel) { int index = searchAudioIndexByMediaLabel(mediaLabel); if (index > -1) { list.remove(index).sendStop(); } } Audios(MediaPlayer player); Audio add(String mediaLabel, int duration); Audio add(String mediaLabel, String mediaTheme1, int duration); Audio add(String mediaLabel, String mediaTheme1, String mediaTheme2, int duration); Audio add(String mediaLabel, String mediaTheme1, String mediaTheme2, String mediaTheme3, int duration); void remove(String mediaLabel); void removeAll();  }