You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

442 lines
19 KiB

  1. package de.hs_fulda.ciip.projjpn;
  2. import junit.framework.TestCase;
  3. public class GamesTest extends TestCase {
  4. public void test_checkConnection() {
  5. Games testObject = new Games();
  6. boolean expected = true;
  7. boolean actual = testObject.checkConnection();
  8. assertEquals(expected, actual);
  9. }
  10. public void test_checkGames() {
  11. Games testObject = new Games();
  12. String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy";
  13. String actual = testObject.checkGames();
  14. assertEquals(expected, actual);
  15. }
  16. public void test_checkConsoles() {
  17. Games testObject = new Games();
  18. String expected = "PlayStation 4, Multiplatform, Nintendo Switch, Nintendo DS, PlayStation 3, Xbox, PlayStation Portable, Nintendo 3DS, Xbox 360, PlayStation Vita";
  19. String actual = testObject.checkConsoles();
  20. assertEquals(expected, actual);
  21. }
  22. public void test_checkAllSamePublishers() {
  23. Games testObject = new Games();
  24. String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy";
  25. String actual = testObject.checkAllSamePublishers();
  26. assertEquals(expected, actual);
  27. }
  28. public void test_checkAllDifferentPublishers() {
  29. Games testObject = new Games();
  30. String expected = "Atelier Totori Plus";
  31. String actual = testObject.checkAllDifferentPublishers();
  32. assertEquals(expected, actual);
  33. }
  34. public void test_checkAllSamePublishersDeveloper() {
  35. Games testObject = new Games();
  36. String expected = "Beautiful Katamari";
  37. String actual = testObject.checkAllDifferentPublishersDeveloper();
  38. assertEquals(expected, actual);
  39. }
  40. public void test_checkAllSameReleaseDates() {
  41. Games testObject = new Games();
  42. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate";
  43. String actual = testObject.checkAllSameReleaseDates();
  44. assertEquals(expected, actual);
  45. }
  46. public void test_checkAllDifferentReleaseDates() {
  47. Games testObject = new Games();
  48. String expected = "Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Beautiful Katamari, Atelier Totori Plus";
  49. String actual = testObject.checkAllDifferentReleaseDates();
  50. assertEquals(expected, actual);
  51. }
  52. public void test_checkGameGenres() {
  53. Games testObject = new Games();
  54. String expected = "JRPG, Action-Adventure, Tactical role-playing, Strategy, Rhythm, Fighting, Survival Horror, Action, Adventure, RPG, Life Simulation, Puzzle, Platformer";
  55. String actual = testObject.checkGameGenres();
  56. assertEquals(expected, actual);
  57. }
  58. public void test_checkGameGenreActionAdventure() {
  59. Games testObject = new Games();
  60. String expected = "Ratchet & Clank, Astral Chain, Breakdown";
  61. String actual = testObject.checkGameGenreActionAdventure();
  62. assertEquals(expected, actual);
  63. }
  64. public void test_checkGameGenreRPG() {
  65. Games testObject = new Games();
  66. String expected = "Persona 3 Portable, Atelier Totori Plus";
  67. String actual = testObject.checkGameGenreRPG();
  68. assertEquals(expected, actual);
  69. }
  70. public void test_checkConsolePlayStation() {
  71. Games testObject = new Games();
  72. String expected = "Persona 5 Royal, Yakuza: Dead Souls, Persona 3 Portable, Atelier Totori Plus";
  73. String actual = testObject.checkConsolePlayStation();
  74. assertEquals(expected, actual);
  75. }
  76. public void test_checkConsoleNintendo() {
  77. Games testObject = new Games();
  78. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life";
  79. String actual = testObject.checkConsoleNintendo();
  80. assertEquals(expected, actual);
  81. }
  82. public void test_checkConsoleXbox() {
  83. Games testObject = new Games();
  84. String expected = "Jet Set Radio Future, Breakdown, Beautiful Katamari";
  85. String actual = testObject.checkConsoleXbox();
  86. assertEquals(expected, actual);
  87. }
  88. public void test_checkConsoleMultiplatform() {
  89. Games testObject = new Games();
  90. String expected = "Ratchet & Clank, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy";
  91. String actual = testObject.checkConsoleMultiplatform();
  92. assertEquals(expected, actual);
  93. }
  94. public void test_checkConsoleNintendoSwitch() {
  95. Games testObject = new Games();
  96. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate";
  97. String actual = testObject.checkConsoleNintendoSwitch();
  98. assertEquals(expected, actual);
  99. }
  100. public void test_checkDeveloperAtlus() {
  101. Games testObject = new Games();
  102. String expected = "Persona 5 Royal, Persona 3 Portable";
  103. String actual = testObject.checkDeveloperAtlus();
  104. assertEquals(expected, actual);
  105. }
  106. public void test_checkDevelopers() {
  107. Games testObject = new Games();
  108. String expected = "Atlus, Insomniac Games, Platinum Games, Intelligent Systems, Artdink, Nintendo SPD, Sora Ltd., Ryu Ga Gotoku Studio, Sega Sports R&D, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Vicarious Visions";
  109. String actual = testObject.checkDevelopers();
  110. assertEquals(expected, actual);
  111. }
  112. public void test_checkPublisherNintendo() {
  113. Games testObject = new Games();
  114. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life";
  115. String actual = testObject.checkPublisherNintendo();
  116. assertEquals(expected, actual);
  117. }
  118. public void test_checkPublisherSega() {
  119. Games testObject = new Games();
  120. String expected = "Persona 5 Royal, Yakuza: Dead Souls, Jet Set Radio Future";
  121. String actual = testObject.checkPublisherSega();
  122. assertEquals(expected, actual);
  123. }
  124. public void test_checkPublishers() {
  125. Games testObject = new Games();
  126. String expected = "Sega, Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Electronic Arts, Namco, Numskull Games, Spike Chunsoft, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Gust Co. Ltd., Tecmo Koei America, Activision";
  127. String actual = testObject.checkPublishers();
  128. assertEquals(expected, actual);
  129. }
  130. public void test_checkPublishersEu() {
  131. Games testObject = new Games();
  132. String expected = "Sega, Sony Computer Entertainment, Nintendo, Electronic Arts, Numskull Games, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Activision";
  133. String actual = testObject.checkPublishersEu();
  134. assertEquals(expected, actual);
  135. }
  136. public void test_checkPublishersJp() {
  137. Games testObject = new Games();
  138. String expected = "Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Activision";
  139. String actual = testObject.checkPublishersJp();
  140. assertEquals(expected, actual);
  141. }
  142. public void test_checkPublishersNa() {
  143. Games testObject = new Games();
  144. String expected = "Atlus, Sony Computer Entertainment, Nintendo, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Tecmo Koei America, Activision";
  145. String actual = testObject.checkPublishersNa();
  146. assertEquals(expected, actual);
  147. }
  148. public void test_checkReleaseDateUnknown() {
  149. Games testObject = new Games();
  150. String expected = "Breakdown, Atelier Totori Plus";
  151. String actual = testObject.checkReleaseDateUnknown();
  152. assertEquals(expected, actual);
  153. }
  154. public void test_checkAllSameReleaseYear() {
  155. Games testObject = new Games();
  156. String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy";
  157. String actual = testObject.checkAllSameReleaseYear();
  158. assertEquals(expected, actual);
  159. }
  160. public void test_checkAllDifferentReleaseYear() {
  161. Games testObject = new Games();
  162. String expected = "Persona 5 Royal, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus";
  163. String actual = testObject.checkAllDifferentReleaseYear();
  164. assertEquals(expected, actual);
  165. }
  166. public void test_checkAllSameReleaseMonth() {
  167. Games testObject = new Games();
  168. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, AI: The Somnium Files";
  169. String actual = testObject.checkAllSameReleaseMonth();
  170. assertEquals(expected, actual);
  171. }
  172. public void test_checkAllDifferentReleaseMonth() {
  173. Games testObject = new Games();
  174. String expected = "Persona 5 Royal, Ratchet & Clank, Rhythm Paradise, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy";
  175. String actual = testObject.checkAllDifferentReleaseMonth();
  176. assertEquals(expected, actual);
  177. }
  178. public void test_checkOnePlayer() {
  179. Games testObject = new Games();
  180. String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy";
  181. String actual = testObject.checkOnePlayer();
  182. assertEquals(expected, actual);
  183. }
  184. public void test_checkTwoPlayer() {
  185. Games testObject = new Games();
  186. String expected = "Astral Chain, Super Smash Bros. Ultimate, Jet Set Radio Future";
  187. String actual = testObject.checkTwoPlayer();
  188. assertEquals(expected, actual);
  189. }
  190. public void test_checkFourPlayer() {
  191. Games testObject = new Games();
  192. String expected = "Super Smash Bros. Ultimate, Jet Set Radio Future";
  193. String actual = testObject.checkFourPlayer();
  194. assertEquals(expected, actual);
  195. }
  196. public void test_checkEightPlayer() {
  197. Games testObject = new Games();
  198. String expected = "Super Smash Bros. Ultimate";
  199. String actual = testObject.checkEightPlayer();
  200. assertEquals(expected, actual);
  201. }
  202. public void test_checkOnePlayerOnly() {
  203. Games testObject = new Games();
  204. String expected = "Persona 5 Royal, Ratchet & Clank, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy";
  205. String actual = testObject.checkOnePlayerOnly();
  206. assertEquals(expected, actual);
  207. }
  208. public void test_checkUskZero() {
  209. Games testObject = new Games();
  210. String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari";
  211. String actual = testObject.checkUskZero();
  212. assertEquals(expected, actual);
  213. }
  214. public void test_checkUskSix() {
  215. Games testObject = new Games();
  216. String expected = "Ratchet & Clank, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy";
  217. String actual = testObject.checkUskSix();
  218. assertEquals(expected, actual);
  219. }
  220. public void test_checkUskTwelve() {
  221. Games testObject = new Games();
  222. String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, Persona 3 Portable";
  223. String actual = testObject.checkUskTwelve();
  224. assertEquals(expected, actual);
  225. }
  226. public void test_checkUskSixteen() {
  227. Games testObject = new Games();
  228. String expected = "Persona 5 Royal, Astral Chain, Breakdown, AI: The Somnium Files";
  229. String actual = testObject.checkUskSixteen();
  230. assertEquals(expected, actual);
  231. }
  232. public void test_checkUskEighteen() {
  233. Games testObject = new Games();
  234. String expected = "Yakuza: Dead Souls";
  235. String actual = testObject.checkUskEighteen();
  236. assertEquals(expected, actual);
  237. }
  238. public void test_checkPegiThree() {
  239. Games testObject = new Games();
  240. String expected = "Ratchet & Clank, Rhythm Paradise, Tomodachi Life, Beautiful Katamari";
  241. String actual = testObject.checkPegiThree();
  242. assertEquals(expected, actual);
  243. }
  244. public void test_checkPegiSeven() {
  245. Games testObject = new Games();
  246. String expected = "Crash Bandicoot N. Sane Trilogy";
  247. String actual = testObject.checkPegiSeven();
  248. assertEquals(expected, actual);
  249. }
  250. public void test_checkPegiTwelve() {
  251. Games testObject = new Games();
  252. String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Persona 3 Portable, Atelier Totori Plus";
  253. String actual = testObject.checkPegiTwelve();
  254. assertEquals(expected, actual);
  255. }
  256. public void test_checkPegiSixteen() {
  257. Games testObject = new Games();
  258. String expected = "Persona 5 Royal, Astral Chain";
  259. String actual = testObject.checkPegiSixteen();
  260. assertEquals(expected, actual);
  261. }
  262. public void test_checkPegiEighteen() {
  263. Games testObject = new Games();
  264. String expected = "Yakuza: Dead Souls, Breakdown, AI: The Somnium Files";
  265. String actual = testObject.checkPegiEighteen();
  266. assertEquals(expected, actual);
  267. }
  268. public void test_checkPegiUnknown() {
  269. Games testObject = new Games();
  270. String expected = "Jet Set Radio Future";
  271. String actual = testObject.checkPegiUnknown();
  272. assertEquals(expected, actual);
  273. }
  274. public void test_checkEsrbE() {
  275. Games testObject = new Games();
  276. String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari";
  277. String actual = testObject.checkEsrbE();
  278. assertEquals(expected, actual);
  279. }
  280. public void test_checkEsrbEten() {
  281. Games testObject = new Games();
  282. String expected = "Super Smash Bros. Ultimate, Crash Bandicoot N. Sane Trilogy";
  283. String actual = testObject.checkEsrbEten();
  284. assertEquals(expected, actual);
  285. }
  286. public void test_checkEsrbT() {
  287. Games testObject = new Games();
  288. String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future, Atelier Totori Plus";
  289. String actual = testObject.checkEsrbT();
  290. assertEquals(expected, actual);
  291. }
  292. public void test_checkEsrbM() {
  293. Games testObject = new Games();
  294. String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable";
  295. String actual = testObject.checkEsrbM();
  296. assertEquals(expected, actual);
  297. }
  298. public void test_checkCeroA() {
  299. Games testObject = new Games();
  300. String expected = "Ratchet & Clank, Rhythm Paradise, Super Smash Bros. Ultimate, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy";
  301. String actual = testObject.checkCeroA();
  302. assertEquals(expected, actual);
  303. }
  304. public void test_checkCeroB() {
  305. Games testObject = new Games();
  306. String expected = "Fire Emblem: Three Houses, Persona 3 Portable, Atelier Totori Plus";
  307. String actual = testObject.checkCeroB();
  308. assertEquals(expected, actual);
  309. }
  310. public void test_checkCeroC() {
  311. Games testObject = new Games();
  312. String expected = "Persona 5 Royal, Astral Chain, Triangle Strategy, Breakdown";
  313. String actual = testObject.checkCeroC();
  314. assertEquals(expected, actual);
  315. }
  316. public void test_checkCeroD() {
  317. Games testObject = new Games();
  318. String expected = "Yakuza: Dead Souls";
  319. String actual = testObject.checkCeroD();
  320. assertEquals(expected, actual);
  321. }
  322. public void test_checkCeroZ() {
  323. Games testObject = new Games();
  324. String expected = "AI: The Somnium Files";
  325. String actual = testObject.checkCeroZ();
  326. assertEquals(expected, actual);
  327. }
  328. public void test_checkAcbG() {
  329. Games testObject = new Games();
  330. String expected = "Rhythm Paradise, Beautiful Katamari";
  331. String actual = testObject.checkAcbG();
  332. assertEquals(expected, actual);
  333. }
  334. public void test_checkAcbPg() {
  335. Games testObject = new Games();
  336. String expected = "Ratchet & Clank, Super Smash Bros. Ultimate, Tomodachi Life, Crash Bandicoot N. Sane Trilogy";
  337. String actual = testObject.checkAcbPg();
  338. assertEquals(expected, actual);
  339. }
  340. public void test_checkAcbM() {
  341. Games testObject = new Games();
  342. String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future";
  343. String actual = testObject.checkAcbM();
  344. assertEquals(expected, actual);
  345. }
  346. public void test_checkAcbMaFifteen() {
  347. Games testObject = new Games();
  348. String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable";
  349. String actual = testObject.checkAcbMaFifteen();
  350. assertEquals(expected, actual);
  351. }
  352. public void test_checkAcbReighteen() {
  353. Games testObject = new Games();
  354. String expected = "Atelier Totori Plus";
  355. String actual = testObject.checkAcbReighteen();
  356. assertEquals(expected, actual);
  357. }
  358. public void test_printTable() {
  359. Games testObject = new Games();
  360. String expected = "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n"
  361. + "\n"
  362. + "Persona 5 Royal, PlayStation 4, Atlus, Sega, Atlus, Atlus, JRPG, 31.03.2020, 31.10.2019, 31.03.2020, 31.03.2020, 16, 16, M, C, MA 15+, 1\n"
  363. + "Ratchet & Clank, Multiplatform, Insomniac Games, Sony Computer Entertainment, Sony Computer Entertainment, Sony Computer Entertainment, Action-Adventure, 08.11.2002, 03.12.2002, 04.11.2002, 08.11.2002, 6, 3, T, A, PG, 1\n"
  364. + "Astral Chain, Nintendo Switch, Platinum Games, Nintendo, Nintendo, Nintendo, Action-Adventure, 30.08.2019, 30.08.2019, 30.08.2019, 30.08.2019, 16, 16, T, C, M, 1-2\n"
  365. + "Fire Emblem: Three Houses, Nintendo Switch, Intelligent Systems, Nintendo, Nintendo, Nintendo, Tactical role-playing, 26.07.2019, 26.07.2019, 26.07.2019, 26.07.2019, 12, 12, T, B, M, 1\n"
  366. + "Triangle Strategy, Nintendo Switch, Artdink, Nintendo, Square Enix, Nintendo, Strategy, 04.03.2022, 04.03.2022, 04.03.2022, 04.03.2022, 12, 12, T, C, M, 1\n"
  367. + "Rhythm Paradise, Nintendo DS, Nintendo SPD, Nintendo, Nintendo, Nintendo, Rhythm, 01.05.2009, 31.07.2008, 05.04.2009, 04.06.2009, 0, 3, E, A, G, 1\n"
  368. + "Super Smash Bros. Ultimate, Nintendo Switch, Sora Ltd., Nintendo, Nintendo, Nintendo, Fighting, 07.12.2018, 07.12.2018, 07.12.2018, 07.12.2018, 12, 12, E10+, A, PG, 1-8\n"
  369. + "Yakuza: Dead Souls, PlayStation 3, Ryu Ga Gotoku Studio, Sega, Sega, Sega, Survival Horror, 16.03.2012, 09.06.2011, 13.03.2012, 15.03.2012, 18, 18, M, D, MA 15+, 1\n"
  370. + "Jet Set Radio Future, Xbox, Sega Sports R&D, Sega, Sega, Sega, Action, 14.03.2002, 22.02.2002, 25.02.2002, 14.03.2002, 12, Unknown, T, A, M, 1-4\n"
  371. + "Breakdown, Xbox, Namco, Electronic Arts, Namco, Namco, Action-Adventure, 18.06.2004, 29.01.2004, 16.03.2004, Unknown, 16, 18, M, C, MA 15+, 1\n"
  372. + "AI: The Somnium Files, Multiplatform, Spike Chunsoft, Numskull Games, Spike Chunsoft, Spike Chunsoft, Adventure, 20.09.2019, 19.09.2019, 17.09.2019, 20.09.2019, 16, 18, M, Z, MA 15+, 1\n"
  373. + "Persona 3 Portable, PlayStation Portable, Atlus, Ghostlight, Atlus, Atlus, RPG, 29.04.2011, 01.11.2009, 06.07.2010, 16.11.2011, 12, 12, M, B, MA 15+, 1\n"
  374. + "Tomodachi Life, Nintendo 3DS, Nintendo SPD, Nintendo, Nintendo, Nintendo, Life Simulation, 06.06.2014, 18.04.2013, 06.06.2014, 07.06.2014, 0, 3, E, A, PG, 1\n"
  375. + "Beautiful Katamari, Xbox 360, Bandai Namco Games, Bandai Namco Games, Bandai Namco Games, Bandai Namco Games, Puzzle, 29.02.2008, 16.10.2007, 18.10.2007, 07.03.2008, 0, 3, E, A, G, 1\n"
  376. + "Atelier Totori Plus, PlayStation Vita, Gust Co. Ltd., Tecmo Koei Europe, Gust Co. Ltd., Tecmo Koei America, RPG, 20.03.2013, 29.11.2012, 19.03.2013, Unknown, 6, 12, T, B, R 18+, 1\n"
  377. + "Crash Bandicoot N. Sane Trilogy, Multiplatform, Vicarious Visions, Activision, Activision, Activision, Platformer, 30.06.2017, 03.08.2017, 30.06.2017, 30.06.2017, 6, 7, E10+, A, PG, 1";
  378. String actual = testObject.printTable();
  379. assertEquals(expected, actual);
  380. }
  381. }