Browse Source

Informants added to BirthCertificate converters test

Andrew Grant 5 tháng trước cách đây
mục cha
commit
dca73d96de

+ 9 - 0
src/test/java/scot/carricksoftware/grants/converters/certificates/birthcertificates/BirthCertificateCommandConverterTest.java

@@ -54,6 +54,9 @@ class BirthCertificateCommandConverterTest {
         String dateAndPlaceOfMarriage = GetRandomString();
         String fatherRank = GetRandomString();
         String untrackedFather = GetRandomString();
+        Person informant = GetRandomPerson();
+        String untrackedInformant = GetRandomString();
+        String informantQualifier = GetRandomString();
 
 
         source.setId(id);
@@ -74,6 +77,9 @@ class BirthCertificateCommandConverterTest {
         source.setDateAndPlaceOfMarriage(dateAndPlaceOfMarriage);
         source.setFatherRank(fatherRank);
         source.setUntrackedFather(untrackedFather);
+        source.setInformant(informant);
+        source.setUntrackedInformant(untrackedInformant);
+        source.setInformantQualification(informantQualifier);
 
 
         BirthCertificate target = converter.convert(source);
@@ -97,5 +103,8 @@ class BirthCertificateCommandConverterTest {
         assertEquals(untrackedFather, target.getUntrackedFather());
         assertEquals(father, target.getFather());
         assertEquals(mother, target.getMother());
+        assertEquals(informant, target.getInformant());
+        assertEquals(untrackedInformant, target.getUntrackedInformant());
+        assertEquals(informantQualifier, target.getInformantQualification());
     }
 }

+ 9 - 2
src/test/java/scot/carricksoftware/grants/converters/certificates/birthcertificates/BirthCertificateConverterTest.java

@@ -53,6 +53,9 @@ class BirthCertificateConverterTest {
         String fatherRank = GetRandomString();
         String untrackedFather = GetRandomString();
         Place whereBorn = GetRandomPlace();
+        Person informant = GetRandomPerson();
+        String untrackedInformant = GetRandomString();
+        String informantQualifier = GetRandomString();
 
 
         source.setId(id);
@@ -73,8 +76,9 @@ class BirthCertificateConverterTest {
         source.setDateAndPlaceOfMarriage(dateAndPlaceOfMarriage);
         source.setFatherRank(fatherRank);
         source.setUntrackedFather(untrackedFather);
-
-
+        source.setInformant(informant);
+        source.setUntrackedInformant(untrackedInformant);
+        source.setInformantQualification(informantQualifier);
 
         BirthCertificateCommand target = converter.convert(source);
 
@@ -97,5 +101,8 @@ class BirthCertificateConverterTest {
         assertEquals(untrackedFather, target.getUntrackedFather());
         assertEquals(father, target.getFather());
         assertEquals(mother, target.getMother());
+        assertEquals(informant, target.getInformant());
+        assertEquals(untrackedInformant, target.getUntrackedInformant());
+        assertEquals(informantQualifier, target.getInformantQualification());
     }
 }