Prechádzať zdrojové kódy

Divorce certificate domain tests

Andrew Grant 3 mesiacov pred
rodič
commit
33444d6e9f

+ 67 - 0
src/test/java/scot/carricksoftware/grants/domains/certificates/divorce/DivorceCertificateDateTest.java

@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.domains.certificates.divorce;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.DivorceCertificate;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
+
+
+class DivorceCertificateDateTest {
+
+    private DivorceCertificate certificate;
+
+    @BeforeEach
+    void setUp() {
+        certificate = new DivorceCertificate();
+    }
+
+    @Test
+    public void getFirstPartyDateTest() {
+        assertNull(certificate.getFirstPartyDate());
+    }
+
+    @Test
+    public void setFirstPartyDateTest() {
+        String string = GetRandomString();
+        certificate.setFirstPartyDate(string);
+        assertEquals(string, certificate.getFirstPartyDate());
+    }
+
+    @Test
+    public void getSecondPartyDateTest() {
+        assertNull(certificate.getSecondPartyDate());
+    }
+
+    @Test
+    public void setSecondPartyDateTest() {
+        String string = GetRandomString();
+        certificate.setSecondPartyDate(string);
+        assertEquals(string, certificate.getSecondPartyDate());
+    }
+
+    @Test
+    public void getRegisteredDateTest() {
+        assertNull(certificate.getRegisteredDate());
+    }
+
+    @Test
+    public void setRegisteredDateTest() {
+        String string = GetRandomString();
+        certificate.setRegisteredDate(string);
+        assertEquals(string, certificate.getRegisteredDate());
+    }
+
+
+
+
+
+
+}

+ 40 - 0
src/test/java/scot/carricksoftware/grants/domains/certificates/divorce/DivorceCertificateIDTest.java

@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.domains.certificates.divorce;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.DivorceCertificate;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
+
+
+class DivorceCertificateIDTest {
+
+    private DivorceCertificate certificate;
+
+    @BeforeEach
+    void setUp() {
+        certificate = new DivorceCertificate();
+    }
+
+    @Test
+    public void getIdTest() {
+        assertNull(certificate.getId());
+    }
+
+    @Test
+    public void setIdTest() {
+        Long id = GetRandomLong();
+        certificate.setId(id);
+        assertEquals(id, certificate.getId());
+    }
+
+
+
+}

+ 7 - 17
src/test/java/scot/carricksoftware/grants/domains/certificates/DivorceCertificateTest.java → src/test/java/scot/carricksoftware/grants/domains/certificates/divorce/DivorceCertificatePeopleTest.java

@@ -1,21 +1,21 @@
 /*
- * 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.divorce;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.DivorceCertificate;
 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.GenerateRandomNumberValues.GetRandomLong;
 import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
 
 
-class DivorceCertificateTest {
+class DivorceCertificatePeopleTest {
 
     private DivorceCertificate certificate;
 
@@ -24,21 +24,9 @@ class DivorceCertificateTest {
         certificate = new DivorceCertificate();
     }
 
-    @Test
-    public void getIdTest() {
-        assertNull(certificate.getId());
-    }
-
-    @Test
-    public void setIdTest() {
-        Long id = GetRandomLong();
-        certificate.setId(id);
-        assertEquals(id, certificate.getId());
-    }
-
     @Test
     public void getFirstPartyTest() {
-        assertNull(certificate.getId());
+        assertNull(certificate.getFirstParty());
     }
 
     @Test
@@ -61,4 +49,6 @@ class DivorceCertificateTest {
     }
 
 
+
+
 }