Browse Source

Refactored Code and Class

dev
Adem Berber 2 years ago
parent
commit
bb01756f68
  1. 22
      projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java
  2. 23
      projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java

22
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";

23
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);
}
}
Loading…
Cancel
Save