Bläddra i källkod

Death certificate updates year of death - test constructors

Andrew Grant 4 månader sedan
förälder
incheckning
a75b47e47a

+ 1 - 0
src/main/java/scot/carricksoftware/grants/domains/people/Person.java

@@ -36,6 +36,7 @@ public class Person extends BaseEntity {
     @Column(name = "`certified_year_of_birth`")
     String certifiedYearOfBirth;
 
+    @SuppressWarnings("JpaDataSourceORMInspection")
     @Column(name = "`certified_year_of_death`")
     String certifiedYearOfDeath;
 

+ 6 - 1
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerSaveOrUpdateTest.java

@@ -18,6 +18,7 @@ import scot.carricksoftware.grants.commands.certificates.deathcertificates.Death
 import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
 import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
 import scot.carricksoftware.grants.services.certificates.deathcertificates.DeathCertificateService;
+import scot.carricksoftware.grants.services.certificates.deathcertificates.UpdateCertifiedYearOfDeath;
 import scot.carricksoftware.grants.services.people.PersonService;
 import scot.carricksoftware.grants.services.places.organisations.OrganisationService;
 import scot.carricksoftware.grants.services.places.places.PlaceService;
@@ -53,6 +54,9 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
     @Mock
     private OrganisationService organisationServiceMock;
 
+    @Mock
+    private UpdateCertifiedYearOfDeath updateCertifiedYearOfDeathMock;
+
     @Mock
     Model modelMock;
 
@@ -77,7 +81,8 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
                 personServiceMock,
                 placeServiceMock,
                 organisationServiceMock,
-                capitaliseDeathCertificateMock);
+                capitaliseDeathCertificateMock,
+                updateCertifiedYearOfDeathMock);
         deathCertificateCommand = new DeathCertificateCommandImpl();
     }
 

+ 6 - 1
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerTest.java

@@ -20,6 +20,7 @@ import scot.carricksoftware.grants.converters.certificates.deathcertificates.Dea
 import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
 import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
 import scot.carricksoftware.grants.services.certificates.deathcertificates.DeathCertificateService;
+import scot.carricksoftware.grants.services.certificates.deathcertificates.UpdateCertifiedYearOfDeath;
 import scot.carricksoftware.grants.services.people.PersonService;
 import scot.carricksoftware.grants.services.places.organisations.OrganisationService;
 import scot.carricksoftware.grants.services.places.places.PlaceService;
@@ -66,6 +67,9 @@ public class DeathCertificateFormControllerTest {
     @Mock
     CapitaliseDeathCertificate capitaliseDeathCertificateMock;
 
+    @Mock
+    private UpdateCertifiedYearOfDeath updateCertifiedYearOfDeathMock;
+
 
     @BeforeEach
     public void setUp() {
@@ -76,7 +80,8 @@ public class DeathCertificateFormControllerTest {
                 personServiceMock,
                 placeServiceMock,
                 organisationServiceMock,
-                capitaliseDeathCertificateMock);
+                capitaliseDeathCertificateMock,
+                updateCertifiedYearOfDeathMock);
     }
 
     @Test

+ 6 - 1
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerValidationTest.java

@@ -19,6 +19,7 @@ import scot.carricksoftware.grants.commands.certificates.deathcertificates.Death
 import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
 import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverter;
 import scot.carricksoftware.grants.services.certificates.deathcertificates.DeathCertificateService;
+import scot.carricksoftware.grants.services.certificates.deathcertificates.UpdateCertifiedYearOfDeath;
 import scot.carricksoftware.grants.services.people.PersonService;
 import scot.carricksoftware.grants.services.places.organisations.OrganisationService;
 import scot.carricksoftware.grants.services.places.places.PlaceService;
@@ -63,6 +64,9 @@ public class DeathCertificateFormControllerValidationTest {
     @Mock
     private Model modelMock;
 
+    @Mock
+    private UpdateCertifiedYearOfDeath updateCertifiedYearOfDeathMock;
+
     @Mock
     CapitaliseDeathCertificate capitaliseDeathCertificateMock;
 
@@ -76,7 +80,8 @@ public class DeathCertificateFormControllerValidationTest {
                 personServiceMock,
                 placeServiceMock,
                 organisationServiceMock,
-                capitaliseDeathCertificateMock);
+                capitaliseDeathCertificateMock,
+                updateCertifiedYearOfDeathMock);
     }