瀏覽代碼

DeathCertificateCapitalisation is applied

Andrew Grant 4 月之前
父節點
當前提交
a0ac81e25c

+ 4 - 7
src/test/java/scot/carricksoftware/grants/controllers/certificates/birthcertificates/BirthCertificateFormControllerSaveOrUpdateTest.java

@@ -26,6 +26,7 @@ import scot.carricksoftware.grants.validators.certificates.birthcertificate.Birt
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 
@@ -102,15 +103,11 @@ public class BirthCertificateFormControllerSaveOrUpdateTest {
 
     @Test
     public void capitalisationIsAppliedTest() {
-        String whereBorn = "where born";
-        String untrackedFather = "untracked father";
-        birthCertificateCommand.setUntrackedWhereBorn(whereBorn);
-        birthCertificateCommand.setUntrackedFather(untrackedFather);
         when(birthCertificateServiceMock.saveBirthCertificateCommand(any(BirthCertificateCommand.class))).thenReturn(birthCertificateCommand);
-
+        birthCertificateCommand.setId(4L);
         birthCertificateController.saveOrUpdate(birthCertificateCommand, bindingResultMock, modelMock);
-        assertEquals("where born", birthCertificateCommand.getUntrackedWhereBorn());
-        assertEquals("untracked father", birthCertificateCommand.getUntrackedFather());
+        verify(capitaliseBirthCertificateMock).capitalise(birthCertificateCommand);
+
     }
 
 

+ 5 - 0
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerSaveOrUpdateTest.java

@@ -96,4 +96,9 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
         assertEquals("certificates/deathCertificate/form", deathCertificateController.saveOrUpdate(deathCertificateCommand, bindingResultMock, modelMock));
     }
 
+    @Test
+    public void capitalisationIsAppliedTest() {
+
+    }
+
 }