boolean moveTest() modified, boolean testStargates() added to Tester
This commit is contained in:
parent
d61be1d967
commit
1bf5df9b08
@ -66,7 +66,37 @@ public class Tester {
|
|||||||
String[] expectedOutputs = {"ONeill: 1,1\n",
|
String[] expectedOutputs = {"ONeill: 1,1\n",
|
||||||
"ONeill: 1,2\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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user