diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-06-27 22:23:57 +0200 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-06-27 22:23:57 +0200 |
commit | 2b45d7bea0d7cb1031b3cdac54e676c183b8074e (patch) | |
tree | a301aa79885e921bbaf931da3209e1effc178853 /target/site/jacoco/musichub.business/MusicHub.java.html | |
parent | 67071cc33da0c90ee3256868c576434f4162ea69 (diff) |
mvn package
Diffstat (limited to 'target/site/jacoco/musichub.business/MusicHub.java.html')
-rw-r--r-- | target/site/jacoco/musichub.business/MusicHub.java.html | 30 |
1 files changed, 15 insertions, 15 deletions
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 { <span class="nc" id="L341"> }</span> - 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 { +<span class="nc" id="L344"> Scanner scanner = new Scanner(System.in);</span> +<span class="nc" id="L345"> System.out.println("Entrez le titre ou l'artiste de la musique que vous souhaitez chercher dans la base de données");</span> +<span class="nc" id="L346"> String word = scanner.next().toLowerCase(Locale.ROOT);</span> +<span class="nc" id="L347"> List<AudioElement> searchResult = new ArrayList<>();</span> +<span class="nc bnc" id="L348" title="All 2 branches missed."> for(AudioElement el : elements){</span> +<span class="nc bnc" id="L349" title="All 4 branches missed."> if(el.getTitle().toLowerCase(Locale.ROOT).contains(word) || el.getArtist().toLowerCase(Locale.ROOT).contains(word)){</span> +<span class="nc" id="L350"> searchResult.add(el);</span> +<span class="nc" id="L351"> System.out.println(el);</span> } - } +<span class="nc" id="L353"> }</span> - if(searchResult.isEmpty()){ - System.err.println("Aucun résultat pour votre recherche"); +<span class="nc bnc" id="L355" title="All 2 branches missed."> if(searchResult.isEmpty()){</span> +<span class="nc" id="L356"> throw new NoElementFoundException("Any result for your search");</span> } - if (searchResult.size()==1){ - this.getAudioElement(searchResult, searchResult.get(0).getTitle()); +<span class="nc bnc" id="L358" title="All 2 branches missed."> if (searchResult.size()==1){</span> +<span class="nc" id="L359"> this.getAudioElement(searchResult, searchResult.get(0).getTitle());</span> } - } +<span class="nc" id="L361"> }</span> } </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html>
\ No newline at end of file |