From bb01756f6824cd531f8fc01ed5a913ba4db14d38 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:57:32 +0100 Subject: [PATCH] Refactored Code and Class --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 22 +++++++++--------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 23 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 3ecf98a..ea9678e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1324,7 +1324,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskZero() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1353,7 +1353,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskSix() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1382,7 +1382,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskTwelve() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1411,7 +1411,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskSixteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1440,7 +1440,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskEighteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1469,7 +1469,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiThree() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1498,7 +1498,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiSeven() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1527,7 +1527,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiTwelve() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1556,7 +1556,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiSixteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1585,7 +1585,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiEighteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1614,7 +1614,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiUnknown() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 5b2603c..cf601c1 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -226,77 +226,77 @@ public class GamesTest extends TestCase { String actual = testObject.checkOnePlayerOnly(); assertEquals(expected, actual); } - + public void test_checkUskZero() { Games testObject = new Games(); String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; String actual = testObject.checkUskZero(); assertEquals(expected, actual); } - + public void test_checkUskSix() { Games testObject = new Games(); String expected = "Ratchet & Clank, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkUskSix(); assertEquals(expected, actual); } - + public void test_checkUskTwelve() { Games testObject = new Games(); String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, Persona 3 Portable"; String actual = testObject.checkUskTwelve(); assertEquals(expected, actual); } - + public void test_checkUskSixteen() { Games testObject = new Games(); String expected = "Persona 5 Royal, Astral Chain, Breakdown, AI: The Somnium Files"; String actual = testObject.checkUskSixteen(); assertEquals(expected, actual); } - + public void test_checkUskEighteen() { Games testObject = new Games(); String expected = "Yakuza: Dead Souls"; String actual = testObject.checkUskEighteen(); assertEquals(expected, actual); } - + public void test_checkPegiThree() { Games testObject = new Games(); String expected = "Ratchet & Clank, Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; String actual = testObject.checkPegiThree(); assertEquals(expected, actual); } - + public void test_checkPegiSeven() { Games testObject = new Games(); String expected = "Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkPegiSeven(); assertEquals(expected, actual); } - + public void test_checkPegiTwelve() { Games testObject = new Games(); String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Persona 3 Portable, Atelier Totori Plus"; String actual = testObject.checkPegiTwelve(); assertEquals(expected, actual); } - + public void test_checkPegiSixteen() { Games testObject = new Games(); String expected = "Persona 5 Royal, Astral Chain"; String actual = testObject.checkPegiSixteen(); assertEquals(expected, actual); } - + public void test_checkPegiEighteen() { Games testObject = new Games(); String expected = "Yakuza: Dead Souls, Breakdown, AI: The Somnium Files"; String actual = testObject.checkPegiEighteen(); assertEquals(expected, actual); } - + public void test_checkPegiUnknown() { Games testObject = new Games(); String expected = "Jet Set Radio Future"; @@ -304,4 +304,3 @@ public class GamesTest extends TestCase { assertEquals(expected, actual); } } -