Browse Source

DeathCertificate Domain Tests

Andrew Grant 5 months ago
parent
commit
45e874c825

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificateParentsTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificateParentsTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 import scot.carricksoftware.grants.domains.people.Person;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificatePartFourTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificatePartFourTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificatePartThreeTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificatePartThreeTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 import scot.carricksoftware.grants.domains.people.Person;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificatePartTwoTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificatePartTwoTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 import scot.carricksoftware.grants.enums.general.Sex;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificateRegisteredTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificateRegisteredTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificateRegistrationTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificateRegistrationTest.java

@@ -1,13 +1,14 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 import scot.carricksoftware.grants.domains.places.Organisation;
 import scot.carricksoftware.grants.domains.places.Place;
 

+ 3 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificateTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/birth/BirthCertificateTest.java

@@ -1,12 +1,13 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:20. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.domains.certificates;
+package scot.carricksoftware.grants.domains.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
 import scot.carricksoftware.grants.domains.people.Person;
 import scot.carricksoftware.grants.domains.places.Organisation;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;

+ 68 - 0
src/test/java/scot/carricksoftware/grants/domains/certificates/death/DeathCertificatePersonTest.java

@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.domains.certificates.death;
+
+import org.junit.jupiter.api.BeforeEach;
+
+import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
+import scot.carricksoftware.grants.domains.people.Person;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
+
+
+class DeathCertificatePersonTest {
+
+    private DeathCertificate deathCertificate;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificate = new DeathCertificate();
+    }
+    
+    void getDeceasedTest() {
+        assertNull(deathCertificate.getDeceased());
+    }
+
+    void setDeceasedTest() {
+        Person deceased = GetRandomPerson();
+        deathCertificate.setDeceased(deceased);
+        assertEquals(deceased, deathCertificate.getDeceased());
+    }
+
+    void getFatherTest() {
+        assertNull(deathCertificate.getFather());
+    }
+
+    void setFatherTest() {
+        Person father = GetRandomPerson();
+        deathCertificate.setFather(father);
+        assertEquals(father, deathCertificate.getFather());
+    }
+
+    void getMotherTest() {
+        assertNull(deathCertificate.getMother());
+    }
+
+    void setMotherTest() {
+        Person mother = GetRandomPerson();
+        deathCertificate.setMother(mother);
+        assertEquals(mother, deathCertificate.getMother());
+    }
+
+    void getInformantTest() {
+        assertNull(deathCertificate.getInformant());
+    }
+
+    void setInformantTest() {
+        Person informant = GetRandomPerson();
+        deathCertificate.setInformant(informant);
+        assertEquals(informant, deathCertificate.getInformant());
+    }
+
+
+}