From f9de1516a05f91e5632500a3b0a898938d6c795e Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sun, 27 Jun 2021 12:12:56 +0200 Subject: Song class fully covered. --- .../jacoco/musichub.business/AudioElement.html | 2 +- .../musichub.business/AudioElement.java.html | 34 +++++++++++----------- target/site/jacoco/musichub.business/Song.html | 2 +- .../site/jacoco/musichub.business/Song.java.html | 26 ++++++++--------- target/site/jacoco/musichub.business/index.html | 2 +- .../jacoco/musichub.business/index.source.html | 2 +- 6 files changed, 34 insertions(+), 34 deletions(-) (limited to 'target/site/jacoco/musichub.business') diff --git a/target/site/jacoco/musichub.business/AudioElement.html b/target/site/jacoco/musichub.business/AudioElement.html index 084f53f..18f7368 100644 --- a/target/site/jacoco/musichub.business/AudioElement.html +++ b/target/site/jacoco/musichub.business/AudioElement.html @@ -1 +1 @@ -AudioElement

AudioElement

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total174 of 26634 %9 of 1118 %1316477269
createXMLElement(Document, Element)790 %n/a11161611
manageAudioElement()680 %70 %66242411
toString()100 %n/a111111
AudioElement(Element)85587 %2250 %2331401
getUUID()30 %n/a111111
getArtist()30 %n/a111111
getTitle()30 %n/a111111
AudioElement(String, String, int, String, String)19100 %n/a010701
AudioElement(String, String, int, String)18100 %n/a010701
\ No newline at end of file +AudioElement

AudioElement

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total85 of 26668 %9 of 1118 %1116307249
manageAudioElement()680 %70 %66242411
AudioElement(Element)85587 %2250 %2331401
getUUID()30 %n/a111111
getArtist()30 %n/a111111
getTitle()30 %n/a111111
createXMLElement(Document, Element)79100 %n/a0101601
AudioElement(String, String, int, String, String)19100 %n/a010701
AudioElement(String, String, int, String)18100 %n/a010701
toString()10100 %n/a010101
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/AudioElement.java.html b/target/site/jacoco/musichub.business/AudioElement.java.html index 28d9e57..7863e1a 100644 --- a/target/site/jacoco/musichub.business/AudioElement.java.html +++ b/target/site/jacoco/musichub.business/AudioElement.java.html @@ -68,31 +68,31 @@ public abstract class AudioElement { } public String toString() { - return "Title = " + this.title + ", Artist = " + this.artist + ", Length = " + this.lengthInSeconds + ", Content = " + this.content; + return "Title = " + this.title + ", Artist = " + this.artist + ", Length = " + this.lengthInSeconds + ", Content = " + this.content; } public void createXMLElement(Document document, Element parentElement) { - Element nameElement = document.createElement("title"); - nameElement.appendChild(document.createTextNode(title)); - parentElement.appendChild(nameElement); + Element nameElement = document.createElement("title"); + nameElement.appendChild(document.createTextNode(title)); + parentElement.appendChild(nameElement); - Element artistElement = document.createElement("artist"); - artistElement.appendChild(document.createTextNode(artist)); - parentElement.appendChild(artistElement); + Element artistElement = document.createElement("artist"); + artistElement.appendChild(document.createTextNode(artist)); + parentElement.appendChild(artistElement); - Element lengthElement = document.createElement("length"); - lengthElement.appendChild(document.createTextNode(Integer.valueOf(lengthInSeconds).toString())); - parentElement.appendChild(lengthElement); + Element lengthElement = document.createElement("length"); + lengthElement.appendChild(document.createTextNode(Integer.valueOf(lengthInSeconds).toString())); + parentElement.appendChild(lengthElement); - Element UUIDElement = document.createElement("UUID"); - UUIDElement.appendChild(document.createTextNode(uuid.toString())); - parentElement.appendChild(UUIDElement); + Element UUIDElement = document.createElement("UUID"); + UUIDElement.appendChild(document.createTextNode(uuid.toString())); + parentElement.appendChild(UUIDElement); - Element contentElement = document.createElement("content"); - contentElement.appendChild(document.createTextNode(content)); - parentElement.appendChild(contentElement); + Element contentElement = document.createElement("content"); + contentElement.appendChild(document.createTextNode(content)); + parentElement.appendChild(contentElement); - } + } public void manageAudioElement() throws UnsupportedAudioFileException, IOException, LineUnavailableException { diff --git a/target/site/jacoco/musichub.business/Song.html b/target/site/jacoco/musichub.business/Song.html index 6231425..4e3aa10 100644 --- a/target/site/jacoco/musichub.business/Song.html +++ b/target/site/jacoco/musichub.business/Song.html @@ -1 +1 @@ -Song

Song

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total50 of 10552 %4 of 633 %612122627
createXMLElement(Document, Element)290 %n/a117711
setGenre(String)151854 %4233 %464801
toString()60 %n/a111111
Song(Element)12100 %n/a010301
Song(String, String, int, String, String, String)11100 %n/a010301
Song(String, String, int, String, String)10100 %n/a010301
getGenre()4100 %n/a010101
\ No newline at end of file +Song

Song

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 105100 %0 of 6100 %01202607
setGenre(String)33100 %6100 %060801
createXMLElement(Document, Element)29100 %n/a010701
Song(Element)12100 %n/a010301
Song(String, String, int, String, String, String)11100 %n/a010301
Song(String, String, int, String, String)10100 %n/a010301
toString()6100 %n/a010101
getGenre()4100 %n/a010101
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/Song.java.html b/target/site/jacoco/musichub.business/Song.java.html index 86ea1bf..f78cf39 100644 --- a/target/site/jacoco/musichub.business/Song.java.html +++ b/target/site/jacoco/musichub.business/Song.java.html @@ -27,32 +27,32 @@ public class Song extends AudioElement { } public void setGenre(String genre) { - switch (genre.toLowerCase()) { - default -> this.genre = Genre.JAZZ; - case "classic" -> this.genre = Genre.CLASSIC; - case "hiphop" -> this.genre = Genre.HIPHOP; + switch (genre.toLowerCase()) { + default -> this.genre = Genre.JAZZ; + case "classic" -> this.genre = Genre.CLASSIC; + case "hiphop" -> this.genre = Genre.HIPHOP; case "rock" -> this.genre = Genre.ROCK; case "pop" -> this.genre = Genre.POP; - case "rap" -> this.genre = Genre.RAP; + case "rap" -> this.genre = Genre.RAP; } } public String toString() { - return super.toString() + ", Genre = " + getGenre() + "\n"; + return super.toString() + ", Genre = " + getGenre() + "\n"; } public void createXMLElement(Document document, Element parentElement) { // song element - Element song = document.createElement("song"); + Element song = document.createElement("song"); - super.createXMLElement(document, song); + super.createXMLElement(document, song); - Element genreElement = document.createElement("genre"); - genreElement.appendChild(document.createTextNode(genre.getGenre())); - song.appendChild(genreElement); + Element genreElement = document.createElement("genre"); + genreElement.appendChild(document.createTextNode(genre.getGenre())); + song.appendChild(genreElement); - parentElement.appendChild(song); - } + parentElement.appendChild(song); + } } diff --git a/target/site/jacoco/musichub.business/index.html b/target/site/jacoco/musichub.business/index.html index 9e86b79..58b15a0 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 860 of 2 0639 %165 of 1692 %16017245449970811215
MusicHub8030 %1140 %7979195195222211
Album3300 %140 %161684849911
PlayList2020 %140 %141453537711
AudioElement1749234 %9218 %131647726901
AudioBook1640 %100 %171739399911
Song505552 %4233 %61212262701
Language490 %n/a33663311
Category490 %n/a33663311
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
Genre56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 721 of 2 06316 %161 of 1694 %15217242549966811215
MusicHub8030 %1140 %7979195195222211
Album3300 %140 %161684849911
PlayList2020 %140 %141453537711
AudioBook1640 %100 %171739399911
AudioElement8518168 %9218 %111630724901
Language490 %n/a33663311
Category490 %n/a33663311
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
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 7ceb0fd..5de5f23 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 860 of 2 0639 %165 of 1692 %16017245449970811215
MusicHub.java8300 %1140 %8585201201282844
Album.java3300 %140 %161684849911
PlayList.java2020 %140 %141453537711
AudioElement.java1749234 %9218 %131647726901
AudioBook.java1640 %100 %171739399911
Song.java505552 %4233 %61212262701
Language.java490 %n/a33663311
Category.java490 %n/a33663311
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Genre.java56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 721 of 2 06316 %161 of 1694 %15217242549966811215
MusicHub.java8300 %1140 %8585201201282844
Album.java3300 %140 %161684849911
PlayList.java2020 %140 %141453537711
AudioBook.java1640 %100 %171739399911
AudioElement.java8518168 %9218 %111630724901
Language.java490 %n/a33663311
Category.java490 %n/a33663311
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Song.java105100 %6100 %0120260701
Genre.java56100 %n/a03060301
\ No newline at end of file -- cgit v1.2.3