Browse Source

CertificateType added to command

Andrew Grant 6 months ago
parent
commit
70f18b9aa2

+ 0 - 3
docs/additions.txt

@@ -18,6 +18,3 @@
 15: Add the new file to master.xml
 16: Run in terminal  mvn clean test liquibase:update
 
-
-
-

+ 4 - 0
src/main/java/scot/carricksoftware/grants/commands/certificates/birthcertificates/BirthCertificateCommand.java

@@ -35,4 +35,8 @@ public interface BirthCertificateCommand {
 
     @SuppressWarnings("unused")
     void setCertificateDate(String certificateDate);
+
+    String getCertificateType();
+
+    void setCertificateType(String certificateType);
 }

+ 12 - 0
src/main/java/scot/carricksoftware/grants/commands/certificates/birthcertificates/BirthCertificateCommandImpl.java

@@ -20,6 +20,8 @@ public class BirthCertificateCommandImpl implements BirthCertificateCommand {
 
     private String certificateDate;
 
+    private String certificateType;
+
     public Long getId() {
         return Id;
     }
@@ -68,4 +70,14 @@ public class BirthCertificateCommandImpl implements BirthCertificateCommand {
     public void setCertificateSource(Organisation certificateSource) {
         this.certificateSource = certificateSource;
     }
+
+    @Override
+    public String getCertificateType() {
+        return certificateType;
+    }
+
+    @Override
+    public void setCertificateType(String certificateType) {
+        this.certificateType = certificateType;
+    }
 }

+ 11 - 1
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandImplTest.java

@@ -76,11 +76,21 @@ class BirthCertificateCommandImplTest {
     }
 
     @Test
-    void getCertificateIssuedAtTest() {
+    void getCertificateSourceTest() {
         Organisation certificateSource = GetRandomOrganisation();
         command.setCertificateSource(certificateSource);
         assertEquals(certificateSource, command.getCertificateSource());
     }
 
+    @Test
+    void getCertificateTypeTest() {
+        assertNull(command.getCertificateType());
+    }
 
+    @Test
+    void setCertificateTypeTest() {
+        String certificateType = GetRandomString();
+        command.setCertificateType(certificateType);
+        assertEquals(certificateType, command.getCertificateType());
+    }
 }