From 1bf5df9b086dd8b853a6125af83d3d8e01e21cd1 Mon Sep 17 00:00:00 2001 From: ericnerdo Date: Mon, 25 Apr 2016 20:21:11 +0200 Subject: [PATCH] boolean moveTest() modified, boolean testStargates() added to Tester --- cicaprojekt/Tester.java | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) 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; } }