Переглянути джерело

Birth Certificate extra fields in bootstrap

Andrew Grant 6 місяців тому
батько
коміт
7bd9cf5692

+ 4 - 0
src/main/java/scot/carricksoftware/grants/bootstrap/DataLoadCertificates.java

@@ -13,6 +13,7 @@ import scot.carricksoftware.grants.commands.certificates.birthcertificates.Birth
 import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommandImpl;
 import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
 import scot.carricksoftware.grants.domains.places.Organisation;
+import scot.carricksoftware.grants.enums.censusentry.CensusEntrySex;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;
 import scot.carricksoftware.grants.services.certificates.birthcertificates.BirthCertificateService;
 import scot.carricksoftware.grants.services.certificates.deathcertificates.DeathCertificateService;
@@ -59,6 +60,9 @@ public class DataLoadCertificates {
         birthCertificateCommand.setRegistrationAuthority(organisation);
         birthCertificateCommand.setNumber("01");
         birthCertificateCommand.setVolume("1953");
+        birthCertificateCommand.setSex(CensusEntrySex.MALE);
+        birthCertificateCommand.setWhenBorn("25/01/1953");
+        birthCertificateCommand.setWhereBorn("Edinburgh");
 
         birthCertificateService.saveBirthCertificateCommand(birthCertificateCommand);
 

+ 4 - 0
src/test/java/scot/carricksoftware/grants/bootstrap/DataLoadCertificatesTest.java

@@ -10,6 +10,7 @@ import scot.carricksoftware.grants.commands.certificates.birthcertificates.Birth
 import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
 import scot.carricksoftware.grants.domains.people.Person;
 import scot.carricksoftware.grants.domains.places.Organisation;
+import scot.carricksoftware.grants.enums.censusentry.CensusEntrySex;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;
 import scot.carricksoftware.grants.services.certificates.birthcertificates.BirthCertificateService;
 import scot.carricksoftware.grants.services.certificates.deathcertificates.DeathCertificateService;
@@ -68,6 +69,9 @@ public class DataLoadCertificatesTest {
         assertEquals(organisation, captor.getValue().getRegistrationAuthority());
         assertEquals("01", captor.getValue().getNumber());
         assertEquals("1953", captor.getValue().getVolume());
+        assertEquals(CensusEntrySex.MALE, captor.getValue().getSex());
+        assertEquals("25/01/1953", captor.getValue().getWhenBorn());
+        assertEquals("Edinburgh", captor.getValue().getWhereBorn());
     }
 
     @Test