浏览代码

Registered attributes added to converters

Andrew Grant 5 月之前
父节点
当前提交
6fbef50eb0

+ 0 - 1
docs/additions.txt

@@ -9,7 +9,6 @@
 8: Bootstrap
 8: Bootstrap
 9: Bootstrap Test
 9: Bootstrap Test
 10: Modify the form
 10: Modify the form
-10.1: Uppercase on save
 11: Validator
 11: Validator
 12: Validator Test
 12: Validator Test
 12.1 Capitalisation
 12.1 Capitalisation

+ 2 - 1
src/main/java/scot/carricksoftware/grants/converters/certificates/birthcertificates/BirthCertificateCommandConverterImpl.java

@@ -38,7 +38,8 @@ public class BirthCertificateCommandConverterImpl implements BirthCertificateCom
         target.setInformant(source.getInformant());
         target.setInformant(source.getInformant());
         target.setUntrackedInformant(source.getUntrackedInformant());
         target.setUntrackedInformant(source.getUntrackedInformant());
         target.setInformantQualification(source.getInformantQualification());
         target.setInformantQualification(source.getInformantQualification());
-
+        target.setWhenRegistered(source.getWhenRegistered());
+        target.setWhereRegistered(source.getWhereRegistered());
 
 
         return target;
         return target;
     }
     }

+ 2 - 0
src/main/java/scot/carricksoftware/grants/converters/certificates/birthcertificates/BirthCertificateConverterImpl.java

@@ -42,6 +42,8 @@ public class BirthCertificateConverterImpl implements BirthCertificateConverter
         target.setInformant(source.getInformant());
         target.setInformant(source.getInformant());
         target.setUntrackedInformant(source.getUntrackedInformant());
         target.setUntrackedInformant(source.getUntrackedInformant());
         target.setInformantQualification(source.getInformantQualification());
         target.setInformantQualification(source.getInformantQualification());
+        target.setWhenRegistered(source.getWhenRegistered());
+        target.setWhereRegistered(source.getWhereRegistered());
 
 
         return target;
         return target;
     }
     }

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

@@ -57,6 +57,8 @@ class BirthCertificateCommandConverterTest {
         Person informant = GetRandomPerson();
         Person informant = GetRandomPerson();
         String untrackedInformant = GetRandomString();
         String untrackedInformant = GetRandomString();
         String informantQualifier = GetRandomString();
         String informantQualifier = GetRandomString();
+        String whenRegistered= GetRandomString();
+        String whereRegistered= GetRandomString();
 
 
 
 
         source.setId(id);
         source.setId(id);
@@ -80,6 +82,8 @@ class BirthCertificateCommandConverterTest {
         source.setInformant(informant);
         source.setInformant(informant);
         source.setUntrackedInformant(untrackedInformant);
         source.setUntrackedInformant(untrackedInformant);
         source.setInformantQualification(informantQualifier);
         source.setInformantQualification(informantQualifier);
+        source.setWhenRegistered(whenRegistered);
+        source.setWhereRegistered(whereRegistered);
 
 
 
 
         BirthCertificate target = converter.convert(source);
         BirthCertificate target = converter.convert(source);
@@ -106,5 +110,7 @@ class BirthCertificateCommandConverterTest {
         assertEquals(informant, target.getInformant());
         assertEquals(informant, target.getInformant());
         assertEquals(untrackedInformant, target.getUntrackedInformant());
         assertEquals(untrackedInformant, target.getUntrackedInformant());
         assertEquals(informantQualifier, target.getInformantQualification());
         assertEquals(informantQualifier, target.getInformantQualification());
+        assertEquals(whenRegistered, target.getWhenRegistered());
+        assertEquals(whereRegistered, target.getWhereRegistered());
     }
     }
 }
 }

+ 6 - 0
src/test/java/scot/carricksoftware/grants/converters/certificates/birthcertificates/BirthCertificateConverterTest.java

@@ -56,6 +56,8 @@ class BirthCertificateConverterTest {
         Person informant = GetRandomPerson();
         Person informant = GetRandomPerson();
         String untrackedInformant = GetRandomString();
         String untrackedInformant = GetRandomString();
         String informantQualifier = GetRandomString();
         String informantQualifier = GetRandomString();
+        String whenRegistered= GetRandomString();
+        String whereRegistered= GetRandomString();
 
 
 
 
         source.setId(id);
         source.setId(id);
@@ -79,6 +81,8 @@ class BirthCertificateConverterTest {
         source.setInformant(informant);
         source.setInformant(informant);
         source.setUntrackedInformant(untrackedInformant);
         source.setUntrackedInformant(untrackedInformant);
         source.setInformantQualification(informantQualifier);
         source.setInformantQualification(informantQualifier);
+        source.setWhenRegistered(whenRegistered);
+        source.setWhereRegistered(whereRegistered);
 
 
         BirthCertificateCommand target = converter.convert(source);
         BirthCertificateCommand target = converter.convert(source);
 
 
@@ -104,5 +108,7 @@ class BirthCertificateConverterTest {
         assertEquals(informant, target.getInformant());
         assertEquals(informant, target.getInformant());
         assertEquals(untrackedInformant, target.getUntrackedInformant());
         assertEquals(untrackedInformant, target.getUntrackedInformant());
         assertEquals(informantQualifier, target.getInformantQualification());
         assertEquals(informantQualifier, target.getInformantQualification());
+        assertEquals(whenRegistered, target.getWhenRegistered());
+        assertEquals(whereRegistered, target.getWhereRegistered());
     }
     }
 }
 }