diff options
Diffstat (limited to '')
| -rw-r--r-- | src/test/java/design/model/GolferTest.java | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/test/java/design/model/GolferTest.java b/src/test/java/design/model/GolferTest.java index 52e6271..64ac9ac 100644 --- a/src/test/java/design/model/GolferTest.java +++ b/src/test/java/design/model/GolferTest.java @@ -32,15 +32,15 @@ public class GolferTest { assertTrue(testGolfer.checkPassword("weback4321")); } - @Test - void testPrivateConstructor() throws Exception - { - Constructor<Golfer> constructor = Golfer.class.getDeclaredConstructor(String.class, int.class, String.class, List.class, List.class, List.class); - assertTrue(Modifier.isPrivate(constructor.getModifiers())); - constructor.setAccessible(true); - Golfer testGolfer = constructor.newInstance("testUser", 12345, "Test Golfer", new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); - assertNotNull(testGolfer); - } + // @Test + // void testPrivateConstructor() throws Exception + // { + // Constructor<Golfer> constructor = Golfer.class.getDeclaredConstructor(String.class, int.class, String.class, List.class, List.class, List.class); + // assertTrue(Modifier.isPrivate(constructor.getModifiers())); + // constructor.setAccessible(true); + // Golfer testGolfer = constructor.newInstance("testUser", 12345, "Test Golfer", new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); + // assertNotNull(testGolfer); + // } @Test void testSetUserName() @@ -103,27 +103,26 @@ public class GolferTest { assertEquals(exampleRound, testGolfer.getRounds()[0]); } - @Test - void testAddClub() - { - Golfer testGolfer = new Golfer("John Doe", "jdoesgolf2", "weback4321"); - testGolfer.addClub("John Doe", "The Slammer", ClubType.DRIVER); - Club addedClub = testGolfer.getClubs()[0]; - assertTrue(testGolfer.hasClub(addedClub)); - assertTrue(testGolfer.hasClubs()); - } - - @Test - void testRemoveClub() - { - Golfer testGolfer = new Golfer("John Doe", "jdoesgolf2", "weback4321"); - testGolfer.addClub("John Doe", "The Slammer", ClubType.DRIVER); - Club addedClub = testGolfer.getClubs()[0]; - testGolfer.removeClub(addedClub); - assertFalse(testGolfer.hasClub(addedClub)); - assertFalse(testGolfer.hasClubs()); - - } + // @Test + // void testAddClub() + // { + // Golfer testGolfer = new Golfer("John Doe", "jdoesgolf2", "weback4321"); + // testGolfer.addClub("John Doe", "The Slammer", ClubType.DRIVER); + // Club addedClub = testGolfer.getClubs()[0]; + // assertTrue(testGolfer.hasClub(addedClub)); + // assertTrue(testGolfer.hasClubs()); + // } + + // @Test + // void testRemoveClub() + // { + // Golfer testGolfer = new Golfer("John Doe", "jdoesgolf2", "weback4321"); + // testGolfer.addClub("John Doe", "The Slammer", ClubType.DRIVER); + // Club addedClub = testGolfer.getClubs()[0]; + // testGolfer.removeClub(addedClub); + // assertFalse(testGolfer.hasClub(addedClub)); + // assertFalse(testGolfer.hasClubs()); + // } @Test void testToString() |
