|
@@ -7,6 +7,7 @@ package scot.carricksoftware.grants.domains.certificates.death;
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
|
|
|
|
|
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
|
|
import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
|
|
|
import scot.carricksoftware.grants.domains.people.Person;
|
|
import scot.carricksoftware.grants.domains.people.Person;
|
|
|
|
|
|
|
@@ -23,46 +24,66 @@ class DeathCertificatePersonTest {
|
|
|
void setUp() {
|
|
void setUp() {
|
|
|
deathCertificate = new DeathCertificate();
|
|
deathCertificate = new DeathCertificate();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Test
|
|
|
void getDeceasedTest() {
|
|
void getDeceasedTest() {
|
|
|
assertNull(deathCertificate.getDeceased());
|
|
assertNull(deathCertificate.getDeceased());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void setDeceasedTest() {
|
|
void setDeceasedTest() {
|
|
|
Person deceased = GetRandomPerson();
|
|
Person deceased = GetRandomPerson();
|
|
|
deathCertificate.setDeceased(deceased);
|
|
deathCertificate.setDeceased(deceased);
|
|
|
assertEquals(deceased, deathCertificate.getDeceased());
|
|
assertEquals(deceased, deathCertificate.getDeceased());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void getFatherTest() {
|
|
void getFatherTest() {
|
|
|
assertNull(deathCertificate.getFather());
|
|
assertNull(deathCertificate.getFather());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void setFatherTest() {
|
|
void setFatherTest() {
|
|
|
Person father = GetRandomPerson();
|
|
Person father = GetRandomPerson();
|
|
|
deathCertificate.setFather(father);
|
|
deathCertificate.setFather(father);
|
|
|
assertEquals(father, deathCertificate.getFather());
|
|
assertEquals(father, deathCertificate.getFather());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void getMotherTest() {
|
|
void getMotherTest() {
|
|
|
assertNull(deathCertificate.getMother());
|
|
assertNull(deathCertificate.getMother());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void setMotherTest() {
|
|
void setMotherTest() {
|
|
|
Person mother = GetRandomPerson();
|
|
Person mother = GetRandomPerson();
|
|
|
deathCertificate.setMother(mother);
|
|
deathCertificate.setMother(mother);
|
|
|
assertEquals(mother, deathCertificate.getMother());
|
|
assertEquals(mother, deathCertificate.getMother());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void getInformantTest() {
|
|
void getInformantTest() {
|
|
|
assertNull(deathCertificate.getInformant());
|
|
assertNull(deathCertificate.getInformant());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
void setInformantTest() {
|
|
void setInformantTest() {
|
|
|
Person informant = GetRandomPerson();
|
|
Person informant = GetRandomPerson();
|
|
|
deathCertificate.setInformant(informant);
|
|
deathCertificate.setInformant(informant);
|
|
|
assertEquals(informant, deathCertificate.getInformant());
|
|
assertEquals(informant, deathCertificate.getInformant());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ void getSpouseTest() {
|
|
|
|
|
+ assertNull(deathCertificate.getSpouse());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Test
|
|
|
|
|
+ void setSpouseTest() {
|
|
|
|
|
+ Person spouse = GetRandomPerson();
|
|
|
|
|
+ deathCertificate.setSpouse(spouse);
|
|
|
|
|
+ assertEquals(spouse, deathCertificate.getSpouse());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|