diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index 5d53515..dfc5a02 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -66,7 +66,37 @@ public class Tester { String[] expectedOutputs = {"ONeill: 1,1\n", "ONeill: 1,2\n"}; - return testOnSequenceOfCommands(commands, expectedOutputs); + boolean results = testOnSequenceOfCommands(commands, expectedOutputs); + + System.out.print("moveTest: "); + if(results) + System.out.println("Sikeres!"); + else System.out.println("Sikertelen!"); + + return results; + } + + @Test + boolean testStargates(){ + String[] commands = {"loadMap testStargates\n", + "shootONeillsGun B\n", + "rotate O L\n", + "shootOneillsGun Y\n", + "listStargates\n", + "move\n", + "listPlayers\n"}; + + String[] expectedOutputs = {"BlueStargate: 5, 10\n", + "YellowStargate: 5, 9\n", + "ONeill: 5, 9\n"}; + boolean results = testOnSequenceOfCommands(commands, expectedOutputs); + + System.out.print("testStargates: "); + if(results) + System.out.println("Sikeres!"); + else System.out.println("Sikertelen!"); + + return results; } }