Explorar o código

AddAttributesTest Inserted into Death CertificateFormController

Andrew Grant hai 3 meses
pai
achega
00096e5292

+ 0 - 12
src/main/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerImpl.java

@@ -27,9 +27,6 @@ import scot.carricksoftware.grants.converters.certificates.deathcertificates.Dea
 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;
 import scot.carricksoftware.grants.validators.certificates.deathcertificate.DeathCertificateCommandValidator;
 
 @SuppressWarnings("LoggingSimilarMessage")
@@ -42,9 +39,6 @@ public class DeathCertificateFormControllerImpl implements DeathCertificateFormC
     private final DeathCertificateCommandConverter deathCertificateCommandConverter;
     private final DeathCertificateConverter deathCertificateConverter;
     private final DeathCertificateCommandValidator deathCertificateCommandValidator;
-    private final PersonService personService;
-    private final PlaceService placeService;
-    private final OrganisationService organisationService;
     private final CapitaliseDeathCertificate capitaliseDeathCertificate;
     private final UpdateCertifiedYearOfDeath updateCertifiedYearOfDeath;
     private final AddAttributes addAttributes;
@@ -54,9 +48,6 @@ public class DeathCertificateFormControllerImpl implements DeathCertificateFormC
                                               DeathCertificateCommandConverter deathCertificateCommandConverter,
                                               DeathCertificateConverter deathCertificateConverter,
                                               DeathCertificateCommandValidator deathCertificateCommandValidator,
-                                              PersonService personService,
-                                              PlaceService placeService,
-                                              OrganisationService organisationService,
                                               CapitaliseDeathCertificate capitaliseDeathCertificate,
                                               UpdateCertifiedYearOfDeath updateCertifiedYearOfDeath, AddAttributes addAttributes) {
         this.deathCertificateService = deathCertificateService;
@@ -65,10 +56,7 @@ public class DeathCertificateFormControllerImpl implements DeathCertificateFormC
 
         this.deathCertificateConverter = deathCertificateConverter;
         this.deathCertificateCommandValidator = deathCertificateCommandValidator;
-        this.personService = personService;
-        this.placeService = placeService;
 
-        this.organisationService = organisationService;
         this.capitaliseDeathCertificate = capitaliseDeathCertificate;
         this.updateCertifiedYearOfDeath = updateCertifiedYearOfDeath;
         this.addAttributes = addAttributes;

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

@@ -20,9 +20,6 @@ import scot.carricksoftware.grants.converters.certificates.deathcertificates.Dea
 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;
 import scot.carricksoftware.grants.validators.certificates.deathcertificate.DeathCertificateCommandValidator;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -46,15 +43,6 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
     @Mock
     private DeathCertificateConverterImpl deathCertificateConverterMock;
 
-    @Mock
-    private PersonService personServiceMock;
-
-    @Mock
-    private PlaceService placeServiceMock;
-
-    @Mock
-    private OrganisationService organisationServiceMock;
-
     @Mock
     private UpdateCertifiedYearOfDeath updateCertifiedYearOfDeathMock;
 
@@ -82,9 +70,6 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
                 deathCertificateCommandConverterMock,
                 deathCertificateConverterMock,
                 deathCertificateCommandValidatorMock,
-                personServiceMock,
-                placeServiceMock,
-                organisationServiceMock,
                 capitaliseDeathCertificateMock,
                 updateCertifiedYearOfDeathMock,
                 addAttributesMock);

+ 0 - 17
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerTest.java

@@ -9,7 +9,6 @@ package scot.carricksoftware.grants.controllers.certificates.deathcertificates;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 import org.springframework.ui.Model;
@@ -22,14 +21,10 @@ import scot.carricksoftware.grants.converters.certificates.deathcertificates.Dea
 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;
 import scot.carricksoftware.grants.validators.certificates.deathcertificate.DeathCertificateCommandValidator;
 
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.*;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.*;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
@@ -53,15 +48,6 @@ public class DeathCertificateFormControllerTest {
     @Mock
     private Model modelMock;
 
-    @Mock
-    private PersonService personServiceMock;
-
-    @Mock
-    private PlaceService placeServiceMock;
-
-    @Mock
-    private OrganisationService organisationServiceMock;
-
     @Mock
     private DeathCertificateCommandValidator deathCertificateCommandValidatorMock;
 
@@ -81,9 +67,6 @@ public class DeathCertificateFormControllerTest {
                 deathCertificateCommandConverterMock,
                 deathCertificateConverterMock,
                 deathCertificateCommandValidatorMock,
-                personServiceMock,
-                placeServiceMock,
-                organisationServiceMock,
                 capitaliseDeathCertificateMock,
                 updateCertifiedYearOfDeathMock,
                 addAttributesMock);

+ 0 - 15
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerValidationTest.java

@@ -21,9 +21,6 @@ import scot.carricksoftware.grants.converters.certificates.deathcertificates.Dea
 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;
 import scot.carricksoftware.grants.validators.certificates.deathcertificate.DeathCertificateCommandValidator;
 
 import static org.mockito.Mockito.verify;
@@ -50,15 +47,6 @@ public class DeathCertificateFormControllerValidationTest {
     @Mock
     private BindingResult bindingResultMock;
 
-    @Mock
-    private PersonService personServiceMock;
-
-    @Mock
-    private PlaceService placeServiceMock;
-
-    @Mock
-    private OrganisationService organisationServiceMock;
-
     @Mock
     private DeathCertificateCommandValidator deathCertificateCommandValidatorMock;
 
@@ -81,9 +69,6 @@ public class DeathCertificateFormControllerValidationTest {
                 deathCertificateCommandConverterMock,
                 deathCertificateConverterMock,
                 deathCertificateCommandValidatorMock,
-                personServiceMock,
-                placeServiceMock,
-                organisationServiceMock,
                 capitaliseDeathCertificateMock,
                 updateCertifiedYearOfDeathMock,
                 addAttributesMock);