From 3175b14cde283dbf76f7a3f6ac32f96cf23035cc Mon Sep 17 00:00:00 2001 From: sahar Date: Tue, 15 Feb 2022 17:45:34 +0100 Subject: [PATCH] UsbPlayerTest.isAllAudioTestTest Fifth Case (wma) --- src/main/java/device/usbPlayer/UsbPlayer.java | 2 +- src/test/java/device/usbPlayer/UsbPlayerTest.java | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index 1ce300d..b3ea2a8 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") ) { + if (song.equals(".mp3") | song.equals(".mp4")| song.equals(".m4a")| song.equals(".wav")| song.equals(".wma") ) { flag = true; } else { flag = false; diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index 0d5b6ca..d038d60 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -268,18 +268,26 @@ class UsbPlayerTest { Pl1.add("Musik 02.m4a"); Pl1.add("Musik 03.m4a"); up3.setPlaylist(Pl1); - //Flac + //wav UsbPlayer up4 = new UsbPlayer(); ArrayList Pl2 = new ArrayList(); Pl2.add("Musik 01.wav"); Pl2.add("Musik 02.wav"); Pl2.add("Musik 03.wav"); up4.setPlaylist(Pl2); + //wma + UsbPlayer up5 = new UsbPlayer(); + ArrayList Pl3 = new ArrayList(); + Pl3.add("Musik 01.wma"); + Pl3.add("Musik 02.wma"); + Pl3.add("Musik 03.wma"); + up5.setPlaylist(Pl3); 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 .wav ", up4.isAllAudio(), true), + Arguments.of("Check if the Files are .wma ", up5.isAllAudio(), true) ); }