From a9f46e2164f0d9ce416f34ebcb68d532de98cdb2 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sun, 27 Jun 2021 11:55:45 +0200 Subject: Starting Song tests --- .../site/jacoco/musichub.business/Song.java.html | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'target/site/jacoco/musichub.business/Song.java.html') diff --git a/target/site/jacoco/musichub.business/Song.java.html b/target/site/jacoco/musichub.business/Song.java.html index 4f7f01d..86ea1bf 100644 --- a/target/site/jacoco/musichub.business/Song.java.html +++ b/target/site/jacoco/musichub.business/Song.java.html @@ -8,34 +8,34 @@ public class Song extends AudioElement { private Genre genre; public Song(String title, String artist, int length, String uid, String content, String genre) { - super(title, artist, length, uid, content); - this.setGenre(genre); - } + super(title, artist, length, uid, content); + this.setGenre(genre); + } public Song(String title, String artist, int length, String content, String genre) { - super(title, artist, length, content); - this.setGenre(genre); - } + super(title, artist, length, content); + this.setGenre(genre); + } public Song(Element xmlElement) { - super(xmlElement); - this.setGenre(xmlElement.getElementsByTagName("genre").item(0).getTextContent()); - } + super(xmlElement); + this.setGenre(xmlElement.getElementsByTagName("genre").item(0).getTextContent()); + } public String getGenre() { - return genre.getGenre(); + return genre.getGenre(); } public void setGenre(String genre) { - switch (genre.toLowerCase()) { + 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 "rock" -> this.genre = Genre.ROCK; + case "pop" -> this.genre = Genre.POP; case "rap" -> this.genre = Genre.RAP; } - } + } public String toString() { return super.toString() + ", Genre = " + getGenre() + "\n"; -- cgit v1.2.3