Bladeren bron

DeathCertificateCommand

Andrew Grant 4 maanden geleden
bovenliggende
commit
368edb2b35

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandInformantTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandInformantTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandRegisteredTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandRegisteredTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandRegistrationTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandRegistrationTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandThreeFieldsTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandThreeFieldsTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandUsualResidenceTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificateCommandUsualResidenceTest.java

@@ -1,9 +1,9 @@
 /*
- * 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.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

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

@@ -1,9 +1,9 @@
 /*
- * 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.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificatePlaceOfBirthTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/birth/BirthCertificatePlaceOfBirthTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.birth;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;

+ 90 - 0
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandPersonTest.java

@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.commands.certificates.death;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
+import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
+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 DeathCertificateCommandPersonTest {
+
+    private DeathCertificateCommand deathCertificateCommand;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificateCommand = new DeathCertificateCommandImpl();
+    }
+
+    @Test
+    void getDeceasedTest() {
+        assertNull(deathCertificateCommand.getDeceased());
+    }
+
+    @Test
+    void setDeceasedTest() {
+        Person deceased = GetRandomPerson();
+        deathCertificateCommand.setDeceased(deceased);
+        assertEquals(deceased, deathCertificateCommand.getDeceased());
+    }
+
+    @Test
+    void getFatherTest() {
+        assertNull(deathCertificateCommand.getFather());
+    }
+
+    @Test
+    void setFatherTest() {
+        Person father = GetRandomPerson();
+        deathCertificateCommand.setFather(father);
+        assertEquals(father, deathCertificateCommand.getFather());
+    }
+
+    @Test
+    void getMotherTest() {
+        assertNull(deathCertificateCommand.getMother());
+    }
+
+    @Test
+    void setMotherTest() {
+        Person mother = GetRandomPerson();
+        deathCertificateCommand.setMother(mother);
+        assertEquals(mother, deathCertificateCommand.getMother());
+    }
+
+    @Test
+    void getInformantTest() {
+        assertNull(deathCertificateCommand.getInformant());
+    }
+
+    @Test
+    void setInformantTest() {
+        Person informant = GetRandomPerson();
+        deathCertificateCommand.setInformant(informant);
+        assertEquals(informant, deathCertificateCommand.getInformant());
+    }
+
+    @Test
+    void getSpouseTest() {
+        assertNull(deathCertificateCommand.getSpouse());
+    }
+
+    @Test
+    void setSpouseTest() {
+        Person spouse = GetRandomPerson();
+        deathCertificateCommand.setSpouse(spouse);
+        assertEquals(spouse, deathCertificateCommand.getSpouse());
+    }
+
+
+}

+ 79 - 0
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandPlaceTest.java

@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.commands.certificates.death;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
+import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
+import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
+import scot.carricksoftware.grants.domains.places.Place;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
+import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
+
+
+class DeathCertificateCommandPlaceTest {
+
+    private DeathCertificateCommand deathCertificateCommand;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificateCommand = new DeathCertificateCommandImpl();
+    }
+
+
+    @Test
+    void getWhereRegisteredTest() {
+        assertNull(deathCertificateCommand.getWhereRegistered());
+    }
+
+    @Test
+    void setWhereRegisteredTest() {
+        String whereRegistered = GetRandomString();
+        deathCertificateCommand.setWhereRegistered(whereRegistered);
+        assertEquals(whereRegistered, deathCertificateCommand.getWhereRegistered());
+    }
+
+    @Test
+    void getInformantAddressTest() {
+        assertNull(deathCertificateCommand.getInformantAddress());
+    }
+
+    @Test
+    void setInformantAddressTest() {
+        String informantAddress = GetRandomString();
+        deathCertificateCommand.setInformantAddress(informantAddress);
+        assertEquals(informantAddress, deathCertificateCommand.getInformantAddress());
+    }
+
+    @Test
+    void getWhereDiedTest() {
+        assertNull(deathCertificateCommand.getWhereDied());
+    }
+
+    @Test
+    void setWhereDiedTest() {
+        Place whereDied = GetRandomPlace();
+        deathCertificateCommand.setWhereDied(whereDied);
+        assertEquals(whereDied, deathCertificateCommand.getWhereDied());
+    }
+
+    @Test
+    void getUsualResidenceTest() {
+        assertNull(deathCertificateCommand.getUsualResidence());
+    }
+
+    @Test
+    void setUsualResidenceTest() {
+        Place usualResidence = GetRandomPlace();
+        deathCertificateCommand.setUsualResidence(usualResidence);
+        assertEquals(usualResidence, deathCertificateCommand.getUsualResidence());
+    }
+
+}

+ 2 - 2
src/test/java/scot/carricksoftware/grants/commands/certificates/DeathCertificateCommandTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.commands.certificates;
+package scot.carricksoftware.grants.commands.certificates.death;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;