From 775ea70300ff438c0cf4179691253f413dfa0871 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 5 Aug 2019 13:46:34 -0600 Subject: move printGrid to Robot --- src/Q9/MovingRobotTest.java | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/Q9/MovingRobotTest.java') diff --git a/src/Q9/MovingRobotTest.java b/src/Q9/MovingRobotTest.java index 0ac68cb..0db0760 100644 --- a/src/Q9/MovingRobotTest.java +++ b/src/Q9/MovingRobotTest.java @@ -179,27 +179,4 @@ public class MovingRobotTest extends TestCase { subject.move(Robot.RIGHT); assertEquals(String.format("%d,%d", Robot.RIGHT, Robot.RIGHT), subject.printMoves()); } - - public void test_printGrid() { - Robot r1 = new MovingRobot(0, 0); - Robot r2 = new MovingRobot(9, 9); - - String expected = - "|1| | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | | |\n" - + "| | | | | | | | | |2|\n"; - String result = MovingRobot.printGrid(r1, r2); - - System.out.println(expected); - System.out.println(result); - - assertEquals(expected, result); - } } -- cgit v1.2.3