Pārlūkot izejas kodu

Reset Death Certificate Converter Tests (2)

Andrew Grant 4 mēneši atpakaļ
vecāks
revīzija
56c92a191b

+ 40 - 0
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandLongTest.java

@@ -0,0 +1,40 @@
+/*
+ * 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 static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
+
+class DeathCertificateCommandLongTest {
+
+    private DeathCertificateCommand deathCertificateCommand;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificateCommand = new DeathCertificateCommandImpl();
+    }
+
+    @Test
+    void getIdTest() {
+        assertNull(deathCertificateCommand.getId());
+    }
+
+    @Test
+    void setIdTest() {
+        Long id = GetRandomLong();
+        deathCertificateCommand.setId(id);
+        assertEquals(id, deathCertificateCommand.getId());
+    }
+
+
+
+}

+ 89 - 0
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandSexTest.java

@@ -0,0 +1,89 @@
+/*
+ * 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 static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
+
+class DeathCertificateCommandSexTest {
+
+    private DeathCertificateCommand deathCertificateCommand;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificateCommand = new DeathCertificateCommandImpl();
+    }
+
+    @Test
+    void getOccupationTest() {
+        assertNull(deathCertificateCommand.getOccupation());
+    }
+
+    @Test
+    void setOccupationTest() {
+        String occupation = GetRandomString();
+        deathCertificateCommand.setOccupation(occupation);
+        assertEquals(occupation, deathCertificateCommand.getOccupation());
+    }
+
+    @Test
+    void getSpouseOccupationTest() {
+        assertNull(deathCertificateCommand.getSpouseOccupation());
+    }
+
+    @Test
+    void setSpouseOccupationTest() {
+        String spouseOccupation = GetRandomString();
+        deathCertificateCommand.setSpouseOccupation(spouseOccupation);
+        assertEquals(spouseOccupation, deathCertificateCommand.getSpouseOccupation());
+    }
+
+    @Test
+    void getFatherOccupationTest() {
+        assertNull(deathCertificateCommand.getFatherOccupation());
+    }
+
+    @Test
+    void setFatherOccupationTest() {
+        String fatherOccupation = GetRandomString();
+        deathCertificateCommand.setFatherOccupation(fatherOccupation);
+        assertEquals(fatherOccupation, deathCertificateCommand.getFatherOccupation());
+    }
+
+    @Test
+    void getMotherOccupationTest() {
+        assertNull(deathCertificateCommand.getMotherOccupation());
+    }
+
+    @Test
+    void setMotherOccupationTest() {
+        String motherOccupation = GetRandomString();
+        deathCertificateCommand.setMotherOccupation(motherOccupation);
+        assertEquals(motherOccupation, deathCertificateCommand.getMotherOccupation());
+    }
+
+    @Test
+    void getMaritalStatusTest() {
+        assertNull(deathCertificateCommand.getMaritalStatus());
+    }
+
+    @Test
+    void setMaritalStatusTest() {
+        String maritalStatus = GetRandomString();
+        deathCertificateCommand.setMaritalStatus(maritalStatus);
+        assertEquals(maritalStatus, deathCertificateCommand.getMaritalStatus());
+    }
+
+
+
+
+}

+ 1 - 14
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandStringTest.java

@@ -13,9 +13,8 @@ import scot.carricksoftware.grants.enums.general.Sex;
 
 import static org.junit.jupiter.api.Assertions.*;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
-import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
 
-class DeathCertificateCommandTest {
+class DeathCertificateCommandStringTest {
 
     private DeathCertificateCommand deathCertificateCommand;
 
@@ -24,18 +23,6 @@ class DeathCertificateCommandTest {
         deathCertificateCommand = new DeathCertificateCommandImpl();
     }
 
-    @Test
-    void getIdTest() {
-        assertNull(deathCertificateCommand.getId());
-    }
-
-    @Test
-    void setIdTest() {
-        Long id = GetRandomLong();
-        deathCertificateCommand.setId(id);
-        assertEquals(id, deathCertificateCommand.getId());
-    }
-
     @Test
     void getSexTest() {
         assertNull(deathCertificateCommand.getSex());

+ 1 - 1
src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandTwoTest.java → src/test/java/scot/carricksoftware/grants/commands/certificates/death/DeathCertificateCommandStringTwoTest.java

@@ -15,7 +15,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
 
 
-class DeathCertificateCommandTwoTest {
+class DeathCertificateCommandStringTwoTest {
 
     private DeathCertificateCommand deathCertificateCommand;