From b2e9f26d0a0ef6c12d7ec8081adb3895c5b75a52 Mon Sep 17 00:00:00 2001 From: sahar Date: Tue, 15 Feb 2022 17:49:10 +0100 Subject: [PATCH] UsbPlayerTest.isAllAudioTestTest Sixth Case (aac) --- src/main/java/device/usbPlayer/UsbPlayer.java | 2 +- src/test/java/device/usbPlayer/UsbPlayerTest.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index b3ea2a8..992ba76 100644 --- a/src/main/java/device/usbPlayer/UsbPlayer.java +++ b/src/main/java/device/usbPlayer/UsbPlayer.java @@ -76,7 +76,7 @@ public class UsbPlayer implements Device { for (int i = 0; i < Playlist.size(); i++) { song = Playlist.get(i).substring(Playlist.get(i).length() - 4); - if (song.equals(".mp3") | song.equals(".mp4")| song.equals(".m4a")| song.equals(".wav")| song.equals(".wma") ) { + if (song.equals(".mp3") | song.equals(".mp4")| song.equals(".m4a")| song.equals(".wav")| song.equals(".wma")| song.equals(".aac") ) { flag = true; } else { flag = false; diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index d038d60..1c8ae91 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -282,12 +282,21 @@ class UsbPlayerTest { Pl3.add("Musik 02.wma"); Pl3.add("Musik 03.wma"); up5.setPlaylist(Pl3); + //aac + UsbPlayer up6 = new UsbPlayer(); + ArrayList Pl4 = new ArrayList(); + Pl4.add("Musik 01.aac"); + Pl4.add("Musik 02.aac"); + Pl4.add("Musik 03.aac"); + up6.setPlaylist(Pl4); + return Stream.of( Arguments.of("Check if the Files are .mp3 ", up1.isAllAudio(), true), Arguments.of("Check if the Files are .mp4 ", up2.isAllAudio(), true), Arguments.of("Check if the Files are .m4a ", up3.isAllAudio(), true), Arguments.of("Check if the Files are .wav ", up4.isAllAudio(), true), - Arguments.of("Check if the Files are .wma ", up5.isAllAudio(), true) + Arguments.of("Check if the Files are .wma ", up5.isAllAudio(), true), + Arguments.of("Check if the Files are .aac ", up6.isAllAudio(), true) ); }