diff options
| author | WillemDalton <willemhdalton@gmail.com> | 2025-11-16 14:14:43 -0500 |
|---|---|---|
| committer | WillemDalton <willemhdalton@gmail.com> | 2025-11-16 14:14:43 -0500 |
| commit | 6fd412fc2981b0d3cbba0e4cf955d1e1a54c9e45 (patch) | |
| tree | c3b743e5fc23dea10a87ce49043baf64041d43d3 /src/test/java/design/model/MatchTest.java | |
| parent | 552602cd1ccd351e9967a90a2e728ed0e4003beb (diff) | |
| download | designproject-design-6-6fd412fc2981b0d3cbba0e4cf955d1e1a54c9e45.tar.gz designproject-design-6-6fd412fc2981b0d3cbba0e4cf955d1e1a54c9e45.tar.bz2 designproject-design-6-6fd412fc2981b0d3cbba0e4cf955d1e1a54c9e45.zip | |
fixed unit tests
Diffstat (limited to 'src/test/java/design/model/MatchTest.java')
| -rw-r--r-- | src/test/java/design/model/MatchTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
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]); |
