Skip to content
Snippets Groups Projects
Commit 7886b6e9 authored by Eilert Werner Hansen's avatar Eilert Werner Hansen :spaghetti:
Browse files

Merge branch 'fix/fix-persontest' into 'main'

fix(persontest) changed test so maven could build

See merge request carljgu/tournament-service!28
parents 15204708 d958bafb
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ public class PersonTest { ...@@ -17,7 +17,7 @@ public class PersonTest {
Person person; Person person;
@Test @Test
public void testUnitCannotHaveBlankName() { public void PersonCannotHaveBlankName() {
try { try {
person = new Competitor(" ", LocalDate.of(2002, 12, 12), Sex.MALE, 1, true, true); person = new Competitor(" ", LocalDate.of(2002, 12, 12), Sex.MALE, 1, true, true);
fail(); fail();
...@@ -27,9 +27,10 @@ public class PersonTest { ...@@ -27,9 +27,10 @@ public class PersonTest {
} }
@Test @Test
public void testUnitCannotStartWithLessThanZeroHealth() { public void IdCreation() {
person = new Competitor("Bart", LocalDate.of(2002, 12, 12), Sex.MALE, 1, true, true); person = new Competitor("Bart", LocalDate.of(2002, 12, 12), Sex.MALE, 1, true, true);
assertEquals(1, person.getId()); Person personTwo = new Competitor("Bart", LocalDate.of(2002, 12, 12), Sex.MALE, 1, true, true);
assertEquals(personTwo.getId(), ((person.getId() + 1)));
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment