Ver Fonte

Birth Certificate domain Tests (2)

Andrew Grant há 2 meses atrás
pai
commit
424cb5ab31

+ 12 - 0
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/birthcertificate/BirthCertificateDateTest.java

@@ -46,4 +46,16 @@ class BirthCertificateDateTest {
         assertEquals(whenBorn, birthCertificate.getWhenBorn());
     }
 
+    @Test
+    void getWhenRegisteredTest() {
+        assertNull(birthCertificate.getWhenRegistered());
+    }
+
+    @Test
+    void setWhenWhenRegisteredTest() {
+        String whenRegistered = GetRandomString();
+        birthCertificate.setWhenRegistered(whenRegistered);
+        assertEquals(whenRegistered, birthCertificate.getWhenRegistered());
+    }
+
 }

+ 13 - 0
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/birthcertificate/BirthCertificatePeopleTest.java

@@ -10,6 +10,7 @@ import org.junit.jupiter.api.Test;
 import scot.carricksoftware.grantswriter.domains.people.Person;
 
 import static org.junit.jupiter.api.Assertions.*;
+import static scot.carricksoftware.grantswriter.GenerateCertificateRandomValues.GetRandomString;
 import static scot.carricksoftware.grantswriter.GenerateRandomPeopleValues.GetRandomPerson;
 
 class BirthCertificatePeopleTest {
@@ -69,4 +70,16 @@ class BirthCertificatePeopleTest {
         assertEquals(person, birthCertificate.getInformant());
     }
 
+    @Test
+    void getUntrackedInformantTest() {
+        assertNull(birthCertificate.getUntrackedInformant());
+    }
+
+    @Test
+    void setWhenUntrackedInformantTest() {
+        String untrackedInformant = GetRandomString();
+        birthCertificate.setUntrackedInformant(untrackedInformant);
+        assertEquals(untrackedInformant, birthCertificate.getUntrackedInformant());
+    }
+
 }