From 1b2c8c8478df47b74f7c33ee6f297e4ee3a192a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Mon, 25 Apr 2016 20:57:41 +0200 Subject: [PATCH 1/2] Implemented shootONeillsGun --- cicaprojekt/Tester.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index a3b6cb2..a9a4885 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -44,6 +44,17 @@ public class Tester { } } + void shootONeillsGun(String param) { + switch (param) { + case "B" : + oneill.shootStargate(Stargate.blueStargate); + break; + case "Y" : + oneill.shootStargate(Stargate.yellowStargate); + break; + } + } + /* custom Test annotation */ @Target(ElementType.METHOD) // it's for methods @Retention(RetentionPolicy.RUNTIME) // we want to retain annotations in runtime From 806c6ae37c556771ee7f5fa16bed7e7253efd561 Mon Sep 17 00:00:00 2001 From: Hegedus Fanni Date: Mon, 25 Apr 2016 21:03:53 +0200 Subject: [PATCH 2/2] added replicatorPosition test in Tester.java --- cicaprojekt/Tester.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index a9a4885..ab66938 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -173,7 +173,22 @@ public class Tester { return results; } - - + + @Test + boolean replicatorPosition(){ + String[] commands = {"loadMap testReplicatorPosition\n", + "move O\n"}; + + String[] expectedOutputs = {}; + + return testOnSequenceOfCommands(commands, expectedOutputs); + + System.out.print("replicatorPosition: "); + if(results) + System.out.println("Sikeres!"); + else System.out.println("Sikertelen!"); + + return results; + } }