diff options
Diffstat (limited to 'src/test/java/design/model')
| -rw-r--r-- | src/test/java/design/model/GolferTest.java | 4 | ||||
| -rw-r--r-- | src/test/java/design/model/MatchTest.java | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/java/design/model/GolferTest.java b/src/test/java/design/model/GolferTest.java index 98dad20..83ca17b 100644 --- a/src/test/java/design/model/GolferTest.java +++ b/src/test/java/design/model/GolferTest.java @@ -36,10 +36,10 @@ public class GolferTest { @Test void testPrivateConstructor() throws Exception { - Constructor<Golfer> constructor = Golfer.class.getDeclaredConstructor(String.class, int.class, String.class, List.class, List.class, List.class); + Constructor<Golfer> constructor = Golfer.class.getDeclaredConstructor(String.class, int.class, String.class, List.class, List.class, List.class, List.class, Team.class); assertTrue(Modifier.isPrivate(constructor.getModifiers())); constructor.setAccessible(true); - Golfer testGolfer = constructor.newInstance("testUser", 12345, "Test Golfer", new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); + Golfer testGolfer = constructor.newInstance("testUser", 12345, "Test Golfer", new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), null); assertNotNull(testGolfer); } diff --git a/src/test/java/design/model/MatchTest.java b/src/test/java/design/model/MatchTest.java index 9058218..c775c11 100644 --- a/src/test/java/design/model/MatchTest.java +++ b/src/test/java/design/model/MatchTest.java @@ -26,7 +26,7 @@ public class MatchTest { Course testCourse = new Course(0, "Rolling Waves", 67, "Rochester. NY", 9, 30, new ArrayList<Hole>()); Date testDate = new Date(1234567); LocalDateTime now = LocalDateTime.now(); - Match testMatch = new Match(testCourse, testDate, now, 9); + Match testMatch = new Match(testCourse, testDate, now, now, 9); assertEquals(testCourse, testMatch.getCourse()); assertEquals(testDate, testMatch.getDateScheduled()); assertEquals(now, testMatch.getStart()); @@ -37,10 +37,10 @@ public class MatchTest { void testPrivateConstructor() throws Exception { Course testCourse = new Course(0, "Rolling Waves", 67, "Rochester. NY", 9, 30, new ArrayList<Hole>()); - Constructor<Match> constructor = Match.class.getDeclaredConstructor(Course.class, Date.class, LocalDateTime.class, int.class, List.class); + Constructor<Match> constructor = Match.class.getDeclaredConstructor(Course.class, Date.class, LocalDateTime.class, LocalDateTime.class, int.class, List.class); assertTrue(Modifier.isPrivate(constructor.getModifiers())); constructor.setAccessible(true); - Match testMatch = constructor.newInstance(testCourse, new Date(1234), LocalDateTime.now(), 0, new ArrayList<>()); + Match testMatch = constructor.newInstance(testCourse, new Date(1234), LocalDateTime.now(), LocalDateTime.now(), 0, new ArrayList<>()); assertNotNull(testMatch); } @@ -50,7 +50,7 @@ public class MatchTest { Course testCourse = new Course(0, "Rolling Waves", 67, "Rochester. NY", 9, 30, new ArrayList<Hole>()); Date testDate = new Date(1234567); LocalDateTime now = LocalDateTime.now(); - Match testMatch = new Match(testCourse, testDate, now, 9); + Match testMatch = new Match(testCourse, testDate, now, now, 9); Round testRound = new Round(testCourse, now, new Hole(0, 5)); testMatch.addRound(testRound); assertEquals(testRound, testMatch.getRounds()[0]); |
