Răsfoiți Sursa

Domain Test (2)

Andrew Grant 5 luni în urmă
părinte
comite
474f0cc075

+ 0 - 2
src/test/java/scot/carricksoftware/grants/domains/certificates/death/DeathCertificatePlaceTest.java

@@ -8,12 +8,10 @@ package scot.carricksoftware.grants.domains.certificates.death;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 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.GenerateCertificateRandomValues.GetRandomString;
-import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
 
 
 class DeathCertificatePlaceTest {

+ 52 - 0
src/test/java/scot/carricksoftware/grants/domains/certificates/death/DeathCertificateTest.java

@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.domains.certificates.death;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
+import scot.carricksoftware.grants.enums.general.Sex;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
+
+
+class DeathCertificateTest {
+
+    private DeathCertificate deathCertificate;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificate = new DeathCertificate();
+    }
+
+
+    @Test
+    void getSexTest() {
+        assertNull(deathCertificate.getSex());
+    }
+
+    @Test
+    void setSexTest() {
+        Sex sex = Sex.MALE;
+        deathCertificate.setSex(sex);
+        assertEquals(sex, deathCertificate.getSex());
+    }
+
+    @Test
+    void getOccupationTest() {
+        assertNull(deathCertificate.getOccupation());
+    }
+
+    @Test
+    void setOccupationTest() {
+        String occupation = GetRandomString();
+        deathCertificate.setOccupation(occupation);
+        assertEquals(occupation, deathCertificate.getOccupation());
+    }
+
+}