From 2b45d7bea0d7cb1031b3cdac54e676c183b8074e Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sun, 27 Jun 2021 22:23:57 +0200 Subject: mvn package --- .../jacoco/musichub.business/MusicHub.java.html | 30 +++++++++++----------- target/site/jacoco/musichub.business/index.html | 2 +- .../jacoco/musichub.business/index.source.html | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'target/site/jacoco/musichub.business') diff --git a/target/site/jacoco/musichub.business/MusicHub.java.html b/target/site/jacoco/musichub.business/MusicHub.java.html index d150675..ec5e661 100644 --- a/target/site/jacoco/musichub.business/MusicHub.java.html +++ b/target/site/jacoco/musichub.business/MusicHub.java.html @@ -340,25 +340,25 @@ public class MusicHub { } - public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException { - Scanner scanner = new Scanner(System.in); - System.out.println("Entrez le titre ou l'artiste de la musique que vous souhaitez chercher dans la base de données"); - String word = scanner.next().toLowerCase(Locale.ROOT); - List<AudioElement> searchResult = new ArrayList<>(); - for(AudioElement el : elements){ - if(el.getTitle().toLowerCase(Locale.ROOT).contains(word) || el.getArtist().toLowerCase(Locale.ROOT).contains(word)){ - searchResult.add(el); - System.out.println(el); + public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException, NoElementFoundException { + Scanner scanner = new Scanner(System.in); + System.out.println("Entrez le titre ou l'artiste de la musique que vous souhaitez chercher dans la base de données"); + String word = scanner.next().toLowerCase(Locale.ROOT); + List<AudioElement> searchResult = new ArrayList<>(); + for(AudioElement el : elements){ + if(el.getTitle().toLowerCase(Locale.ROOT).contains(word) || el.getArtist().toLowerCase(Locale.ROOT).contains(word)){ + searchResult.add(el); + System.out.println(el); } - } + } - if(searchResult.isEmpty()){ - System.err.println("Aucun résultat pour votre recherche"); + if(searchResult.isEmpty()){ + throw new NoElementFoundException("Any result for your search"); } - if (searchResult.size()==1){ - this.getAudioElement(searchResult, searchResult.get(0).getTitle()); + if (searchResult.size()==1){ + this.getAudioElement(searchResult, searchResult.get(0).getTitle()); } - } + } } \ No newline at end of file diff --git a/target/site/jacoco/musichub.business/index.html b/target/site/jacoco/musichub.business/index.html index 359d516..f7cd669 100644 --- a/target/site/jacoco/musichub.business/index.html +++ b/target/site/jacoco/musichub.business/index.html @@ -1 +1 @@ -musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 412 of 2 06331 %150 of 16911 %1341723594995081815
MusicHub8030 %1140 %7979195195222211
Album3300 %140 %161684849911
AudioBook1174728 %8220 %121727394901
AudioElement8518168 %9218 %111630724901
PlayList3217084 %5964 %5149530701
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
Language4693 %n/a13161301
Category4693 %n/a13161301
Song105100 %6100 %0120260701
Genre56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 483 of 2 13430 %160 of 17910 %1401783735135182815
MusicHub8740 %1240 %8585209209232311
Album3300 %140 %161684849911
AudioBook1174728 %8220 %121727394901
AudioElement8518168 %9218 %111630724901
PlayList3217084 %5964 %5149530701
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
Language4693 %n/a13161301
Category4693 %n/a13161301
Song105100 %6100 %0120260701
Genre56100 %n/a03060301
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/index.source.html b/target/site/jacoco/musichub.business/index.source.html index 21f0bb6..15d2893 100644 --- a/target/site/jacoco/musichub.business/index.source.html +++ b/target/site/jacoco/musichub.business/index.source.html @@ -1 +1 @@ -musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 412 of 2 06331 %150 of 16911 %1341723594995081815
MusicHub.java8300 %1140 %8585201201282844
Album.java3300 %140 %161684849911
AudioBook.java1174728 %8220 %121727394901
AudioElement.java8518168 %9218 %111630724901
PlayList.java3217084 %5964 %5149530701
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Language.java4693 %n/a13161301
Category.java4693 %n/a13161301
Song.java105100 %6100 %0120260701
Genre.java56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 483 of 2 13430 %160 of 17910 %1401783735135182815
MusicHub.java9010 %1240 %9191215215292944
Album.java3300 %140 %161684849911
AudioBook.java1174728 %8220 %121727394901
AudioElement.java8518168 %9218 %111630724901
PlayList.java3217084 %5964 %5149530701
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Language.java4693 %n/a13161301
Category.java4693 %n/a13161301
Song.java105100 %6100 %0120260701
Genre.java56100 %n/a03060301
\ No newline at end of file -- cgit v1.2.3