From 5e03237a3dfdc4a301f7cebc371456d8b3b4e866 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 5 Aug 2019 17:12:04 -0600 Subject: use timestamps to initialize date objects --- src/Q10/TrainTimeTableTest.java | 20 ++++++++++---------- src/Q9/RobotTest.java | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Q10/TrainTimeTableTest.java b/src/Q10/TrainTimeTableTest.java index ae88676..ac25c2d 100644 --- a/src/Q10/TrainTimeTableTest.java +++ b/src/Q10/TrainTimeTableTest.java @@ -13,16 +13,16 @@ public class TrainTimeTableTest extends TestCase { private LinkedList stations = new LinkedList( Arrays.asList( - new Station("Vancouver", null, new Date(), 1), - new Station("Kamloops", new Date(), new Date(), 2), - new Station("Jasper", new Date(), new Date(), 2), - new Station("Edmonton", new Date(), new Date(), 2), - new Station("Saskatchewan", new Date(), new Date(), 3), - new Station("Winnipeg", new Date(), new Date(), 3), - new Station("Sioux Lookout", new Date(), new Date(), 4), - new Station("Hornepayne", new Date(), new Date(), 4), - new Station("Capreol", new Date(), new Date(), 5), - new Station("Toronto", new Date(), new Date(), 5))); + new Station("Vancouver", null, new Date(1546374600000l), 1), + new Station("Kamloops", new Date(1546408800000l), new Date(1546410900000l), 2), + new Station("Jasper", new Date(1546444800000l), new Date(1546450200000l), 2), + new Station("Edmonton", new Date(1546470000000l), new Date(1546473540000l), 2), + new Station("Saskatchewan", new Date(1546502400000l), new Date(1546503900000l), 3), + new Station("Winnipeg", new Date(1546548300000l), new Date(1546554600000l), 3), + new Station("Sioux Lookout", new Date(1546578120000l), new Date(1546580520000l), 4), + new Station("Hornepayne", new Date(1546616100000l), new Date(1546618200000l), 4), + new Station("Capreol", new Date(1546647480000l), new Date(1546649280000l), 5), + new Station("Toronto", new Date(1546680600000l), null, 5))); public TrainTimeTableTest(String testName) { super(testName); diff --git a/src/Q9/RobotTest.java b/src/Q9/RobotTest.java index 1a4e495..8dac37f 100644 --- a/src/Q9/RobotTest.java +++ b/src/Q9/RobotTest.java @@ -41,8 +41,8 @@ public class RobotTest extends TestCase { + String.format("|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%3$s|%2$s", sp, rn, sr2); String result = Robot.printGrid(r1, r2); - System.out.println(expected); - System.out.println(result); + // System.out.println(expected); + // System.out.println(result); assertEquals(expected, result); } @@ -67,8 +67,8 @@ public class RobotTest extends TestCase { + String.format("|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%1$s|%2$s", sp, rn); String result = Robot.printGrid(r1, r2); - System.out.println(expected); - System.out.println(result); + // System.out.println(expected); + // System.out.println(result); assertEquals(expected, result); } -- cgit v1.2.3