ソースを参照

Removed census validator test

Andrew Grant 6 ヶ月 前
コミット
5b88b856de
17 ファイル変更207 行追加534 行削除
  1. 10 122
      src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorImpl.java
  2. 71 0
      src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorNonNumericImpl.java
  3. 96 0
      src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorNumericImpl.java
  4. 0 104
      src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorRoomWithWindowsTest.java
  5. 0 88
      src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorRoomsInhabitedTest.java
  6. 0 90
      src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorTest.java
  7. 0 110
      src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorTotalRoomsTest.java
  8. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthDayDayTest.java
  9. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthDayMonthTest.java
  10. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthYearAndAgeTest.java
  11. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthYearTest.java
  12. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenBornAliveTest.java
  13. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenStillAliveTest.java
  14. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenStillWhoHaveDiedTest.java
  15. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorNameTest.java
  16. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorTest.java
  17. 3 2
      src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorYearsCompletedMarriageTest.java

+ 10 - 122
src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorImpl.java

@@ -8,136 +8,24 @@ package scot.carricksoftware.grants.validators.census;
 import org.springframework.stereotype.Component;
 import org.springframework.validation.BindingResult;
 import scot.carricksoftware.grants.commands.census.CensusCommand;
-import scot.carricksoftware.grants.constants.ApplicationConstants;
-import scot.carricksoftware.grants.constants.ValidationConstants;
 
 @Component
 public class CensusCommandValidatorImpl implements CensusCommandValidator {
 
-    public void validate(CensusCommand censusCommand, BindingResult bindingResult) {
-        validateDate(censusCommand, bindingResult);
+    private final CensusCommandValidatorNonNumericImpl validatorNonNumeric;
+    private final CensusCommandValidatorNumericImpl validatorNumeric;
 
-        validateRoomsInhabited(censusCommand, bindingResult);
-        validateRoomsWithWindows(censusCommand, bindingResult);
-        validateTotalRooms(censusCommand, bindingResult);
-        validateRoomsOccupied(censusCommand, bindingResult);
-        validateUninhabitedHouses(censusCommand, bindingResult);
-        validateInhabitedHouses(censusCommand, bindingResult);
 
-        validateTotalRoomsAndInhabitedRooms(censusCommand, bindingResult);
-        validateTotalRoomsAndRoomsWithWindows(censusCommand, bindingResult);
+    public CensusCommandValidatorImpl(CensusCommandValidatorNonNumericImpl validatorNonNumeric,
+                                      CensusCommandValidatorNumericImpl validatorNumeric) {
+        this.validatorNonNumeric = validatorNonNumeric;
+        this.validatorNumeric = validatorNumeric;
     }
 
-    private void validateTotalRoomsAndRoomsWithWindows(CensusCommand censusCommand, BindingResult bindingResult) {
-        if ( censusCommand.getTotalRooms()!= null && !censusCommand.getTotalRooms().isEmpty()) {
-            if ( censusCommand.getRoomsWithWindows()!= null && !censusCommand.getRoomsWithWindows().isEmpty()) {
-                bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
-                        null,
-                        ValidationConstants.TOTAL_ROOMS_AND_ROOMS_WITH_WINDOWS_CANNOT_COEXIST);
-                bindingResult.rejectValue("roomsWithWindows", ApplicationConstants.EMPTY_STRING,
-                        null,
-                        ValidationConstants.TOTAL_ROOMS_AND_ROOMS_WITH_WINDOWS_CANNOT_COEXIST);
-
-            }
-        }
-    }
-
-    private void validateTotalRoomsAndInhabitedRooms(CensusCommand censusCommand, BindingResult bindingResult) {
-        if ( censusCommand.getTotalRooms()!= null && !censusCommand.getTotalRooms().isEmpty()) {
-            if ( censusCommand.getInhabitedRooms()!= null && !censusCommand.getInhabitedRooms().isEmpty()) {
-                bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
-                        null,
-                        ValidationConstants.TOTAL_ROOMS_AND_INHABITED_ROOMS_CANNOT_COEXIST);
-                bindingResult.rejectValue("inhabitedRooms", ApplicationConstants.EMPTY_STRING,
-                        null,
-                        ValidationConstants.TOTAL_ROOMS_AND_INHABITED_ROOMS_CANNOT_COEXIST);
-
-            }
-        }
-    }
-
-    private void validateTotalRooms(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getTotalRooms())) {
-            bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-    private void validateRoomsWithWindows(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getRoomsWithWindows())) {
-            bindingResult.rejectValue("roomsWithWindows", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-    private void validateRoomsInhabited(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getInhabitedRooms())) {
-            bindingResult.rejectValue("inhabitedRooms", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-    private void validateRoomsOccupied(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getRoomsOccupied())) {
-            bindingResult.rejectValue("roomsOccupied", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-    private void validateUninhabitedHouses(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getUninhabitedHouses())) {
-            bindingResult.rejectValue("uninhabitedHouses", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-    private void validateInhabitedHouses(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (notANonNegativeInteger(censusCommand.getInhabitedHouses())) {
-            bindingResult.rejectValue("inhabitedHouses", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
-        }
-    }
-
-
-    private boolean notANonNegativeInteger(String field) {
-        if (field == null || field.isEmpty()) {
-            return false;
-        } else {
-            try {
-                int number = Integer.parseInt(field);
-                if (number < 0) {
-                   return true;
-                }
-            } catch (NumberFormatException e) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void validateDate(CensusCommand censusCommand, BindingResult bindingResult) {
-        if (censusCommand.getCensusDate() == null) {
-            bindingResult.rejectValue("date", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.DATE_IS_NULL);
-        }
-        if (censusCommand.getBoundaryType() == null) {
-            bindingResult.rejectValue("boundaryType", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.BOUNDARY_TYPE_IS_NULL);
-        }
-        if (censusCommand.getPlace() == null) {
-            bindingResult.rejectValue("place", ApplicationConstants.EMPTY_STRING,
-                    null,
-                    ValidationConstants.PLACE_IS_NULL);
-        }
-
+    public void validate(CensusCommand censusCommand,
+                         BindingResult bindingResult) {
+        validatorNonNumeric.validate(censusCommand, bindingResult);
+        validatorNumeric.validate(censusCommand, bindingResult);
     }
 }
 

+ 71 - 0
src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorNonNumericImpl.java

@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 09:50. All rights reserved.
+ *
+ */
+
+package scot.carricksoftware.grants.validators.census;
+
+import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
+import scot.carricksoftware.grants.commands.census.CensusCommand;
+import scot.carricksoftware.grants.constants.ApplicationConstants;
+import scot.carricksoftware.grants.constants.ValidationConstants;
+
+@Component
+public class CensusCommandValidatorNonNumericImpl  {
+
+    public void validate(CensusCommand censusCommand, BindingResult bindingResult) {
+        validateDate(censusCommand, bindingResult);
+        validateTotalRoomsAndInhabitedRooms(censusCommand, bindingResult);
+        validateTotalRoomsAndRoomsWithWindows(censusCommand, bindingResult);
+    }
+
+    private void validateTotalRoomsAndRoomsWithWindows(CensusCommand censusCommand, BindingResult bindingResult) {
+        if ( censusCommand.getTotalRooms()!= null && !censusCommand.getTotalRooms().isEmpty()) {
+            if ( censusCommand.getRoomsWithWindows()!= null && !censusCommand.getRoomsWithWindows().isEmpty()) {
+                bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
+                        null,
+                        ValidationConstants.TOTAL_ROOMS_AND_ROOMS_WITH_WINDOWS_CANNOT_COEXIST);
+                bindingResult.rejectValue("roomsWithWindows", ApplicationConstants.EMPTY_STRING,
+                        null,
+                        ValidationConstants.TOTAL_ROOMS_AND_ROOMS_WITH_WINDOWS_CANNOT_COEXIST);
+
+            }
+        }
+    }
+
+    private void validateTotalRoomsAndInhabitedRooms(CensusCommand censusCommand, BindingResult bindingResult) {
+        if ( censusCommand.getTotalRooms()!= null && !censusCommand.getTotalRooms().isEmpty()) {
+            if ( censusCommand.getInhabitedRooms()!= null && !censusCommand.getInhabitedRooms().isEmpty()) {
+                bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
+                        null,
+                        ValidationConstants.TOTAL_ROOMS_AND_INHABITED_ROOMS_CANNOT_COEXIST);
+                bindingResult.rejectValue("inhabitedRooms", ApplicationConstants.EMPTY_STRING,
+                        null,
+                        ValidationConstants.TOTAL_ROOMS_AND_INHABITED_ROOMS_CANNOT_COEXIST);
+
+            }
+        }
+    }
+
+
+    private void validateDate(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (censusCommand.getCensusDate() == null) {
+            bindingResult.rejectValue("date", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.DATE_IS_NULL);
+        }
+        if (censusCommand.getBoundaryType() == null) {
+            bindingResult.rejectValue("boundaryType", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.BOUNDARY_TYPE_IS_NULL);
+        }
+        if (censusCommand.getPlace() == null) {
+            bindingResult.rejectValue("place", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.PLACE_IS_NULL);
+        }
+
+    }
+}
+

+ 96 - 0
src/main/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorNumericImpl.java

@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 09:50. All rights reserved.
+ *
+ */
+
+package scot.carricksoftware.grants.validators.census;
+
+import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
+import scot.carricksoftware.grants.commands.census.CensusCommand;
+import scot.carricksoftware.grants.constants.ApplicationConstants;
+import scot.carricksoftware.grants.constants.ValidationConstants;
+
+@Component
+public class CensusCommandValidatorNumericImpl {
+
+    public void validate(CensusCommand censusCommand, BindingResult bindingResult) {
+
+        validateRoomsInhabited(censusCommand, bindingResult);
+        validateRoomsWithWindows(censusCommand, bindingResult);
+        validateTotalRooms(censusCommand, bindingResult);
+        validateRoomsOccupied(censusCommand, bindingResult);
+        validateUninhabitedHouses(censusCommand, bindingResult);
+        validateInhabitedHouses(censusCommand, bindingResult);
+
+    }
+
+
+    private void validateTotalRooms(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getTotalRooms())) {
+            bindingResult.rejectValue("totalRooms", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+    private void validateRoomsWithWindows(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getRoomsWithWindows())) {
+            bindingResult.rejectValue("roomsWithWindows", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+    private void validateRoomsInhabited(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getInhabitedRooms())) {
+            bindingResult.rejectValue("inhabitedRooms", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+    private void validateRoomsOccupied(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getRoomsOccupied())) {
+            bindingResult.rejectValue("roomsOccupied", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+    private void validateUninhabitedHouses(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getUninhabitedHouses())) {
+            bindingResult.rejectValue("uninhabitedHouses", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+    private void validateInhabitedHouses(CensusCommand censusCommand, BindingResult bindingResult) {
+        if (notANonNegativeInteger(censusCommand.getInhabitedHouses())) {
+            bindingResult.rejectValue("inhabitedHouses", ApplicationConstants.EMPTY_STRING,
+                    null,
+                    ValidationConstants.FIELD_NOT_NEGATIVE_INTEGER);
+        }
+    }
+
+
+    private boolean notANonNegativeInteger(String field) {
+        if (field == null || field.isEmpty()) {
+            return false;
+        } else {
+            try {
+                int number = Integer.parseInt(field);
+                if (number < 0) {
+                   return true;
+                }
+            } catch (NumberFormatException e) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+}
+

+ 0 - 104
src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorRoomWithWindowsTest.java

@@ -1,104 +0,0 @@
-/*
- * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 11:37. All rights reserved.
- *
- */
-
-package scot.carricksoftware.grants.validators.census;
-
-
-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.validation.BindingResult;
-import scot.carricksoftware.grants.commands.census.CensusCommand;
-import scot.carricksoftware.grants.commands.census.CensusCommandImpl;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.mockito.Mockito.*;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusDate;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-@ExtendWith(MockitoExtension.class)
-class CensusCommandValidatorRoomWithWindowsTest {
-
-    private CensusCommandValidatorImpl censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-
-    private ArgumentCaptor<String> stringArgumentCaptor;
-    private ArgumentCaptor<String> stringArgumentCaptor2;
-    private ArgumentCaptor<String> stringArgumentCaptor3;
-    private ArgumentCaptor<Object[]> objectArgumentCaptor;
-
-    private CensusCommand censusCommand;
-
-    @Mock
-    BindingResult bindingResultMock;
-
-    @BeforeEach
-    void setUp() {
-        censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-        stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor2 = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor3 = ArgumentCaptor.forClass(String.class);
-        objectArgumentCaptor = ArgumentCaptor.forClass(Object[].class);
-
-        censusCommand = new CensusCommandImpl();
-        censusCommand.setPlace(GetRandomPlace());
-        censusCommand.setCensusDate(GetRandomCensusDate());
-        censusCommand.setBoundaryType(GetRandomCensusBoundaryType());
-    }
-
-    @Test
-    public void validateRoomsWithWindowsNegativeTest() {
-        censusCommand.setInhabitedRooms("1");
-        censusCommand.setRoomsWithWindows("-5");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("roomsWithWindows", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-
-    @Test
-    public void validateRoomsWithWindowsNonNumberTest() {
-        censusCommand.setInhabitedRooms("1");
-        censusCommand.setRoomsWithWindows("z");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("roomsWithWindows", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void validateRoomsWithWindowsValidNumberTest() {
-        censusCommand.setInhabitedRooms("3");
-        censusCommand.setRoomsWithWindows("5");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verifyNoInteractions(bindingResultMock);
-    }
-
-    @Test
-    public void validateRoomsWithWindowsNullTest() {
-        censusCommand.setInhabitedRooms("3");
-        censusCommand.setRoomsWithWindows(null);
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verifyNoInteractions(bindingResultMock);
-    }
-
-    @Test
-    public void validateRoomsWithWindowsZeroTest() {
-        censusCommand.setInhabitedRooms("3");
-        censusCommand.setRoomsWithWindows("0");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verifyNoInteractions(bindingResultMock);
-    }
-
-}

+ 0 - 88
src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorRoomsInhabitedTest.java

@@ -1,88 +0,0 @@
-/*
- * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 11:37. All rights reserved.
- *
- */
-
-package scot.carricksoftware.grants.validators.census;
-
-
-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.validation.BindingResult;
-import scot.carricksoftware.grants.commands.census.CensusCommand;
-import scot.carricksoftware.grants.commands.census.CensusCommandImpl;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.mockito.Mockito.*;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusDate;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-@ExtendWith(MockitoExtension.class)
-class CensusCommandValidatorRoomsInhabitedTest {
-
-    private CensusCommandValidatorImpl censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-
-    private ArgumentCaptor<String> stringArgumentCaptor;
-    private ArgumentCaptor<String> stringArgumentCaptor2;
-    private ArgumentCaptor<String> stringArgumentCaptor3;
-    private ArgumentCaptor<Object[]> objectArgumentCaptor;
-
-    private CensusCommand censusCommand;
-
-    @Mock
-    BindingResult bindingResultMock;
-
-    @BeforeEach
-    void setUp() {
-        censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-        stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor2 = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor3 = ArgumentCaptor.forClass(String.class);
-        objectArgumentCaptor = ArgumentCaptor.forClass(Object[].class);
-
-        censusCommand = new CensusCommandImpl();
-        censusCommand.setPlace(GetRandomPlace());
-        censusCommand.setCensusDate(GetRandomCensusDate());
-        censusCommand.setBoundaryType(GetRandomCensusBoundaryType());
-    }
-
-    @Test
-    public void validateRoomsInhabitedNegativeTest() {
-        censusCommand.setInhabitedRooms("-1");
-        censusCommand.setRoomsWithWindows("5");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("inhabitedRooms", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-
-    @Test
-    public void validateRoomsInhabitedNonNumberTest() {
-        censusCommand.setInhabitedRooms("z");
-        censusCommand.setRoomsWithWindows("5");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("inhabitedRooms", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void validateRoomsInhabitedValidNumberTest() {
-        censusCommand.setInhabitedRooms("3");
-        censusCommand.setRoomsWithWindows("5");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verifyNoInteractions(bindingResultMock);
-    }
-
-}

+ 0 - 90
src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorTest.java

@@ -1,90 +0,0 @@
-/*
- * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 11:37. All rights reserved.
- *
- */
-
-package scot.carricksoftware.grants.validators.census;
-
-
-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.validation.BindingResult;
-import scot.carricksoftware.grants.commands.census.CensusCommand;
-import scot.carricksoftware.grants.commands.census.CensusCommandImpl;
-
-import static org.junit.jupiter.api.Assertions.*;
-import static org.mockito.Mockito.atLeast;
-import static org.mockito.Mockito.verify;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusDate;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-@ExtendWith(MockitoExtension.class)
-class CensusCommandValidatorTest {
-
-    private CensusCommandValidatorImpl censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-
-    private ArgumentCaptor<String> stringArgumentCaptor;
-    private ArgumentCaptor<String> stringArgumentCaptor2;
-    private ArgumentCaptor<String> stringArgumentCaptor3;
-    private ArgumentCaptor<Object[]> objectArgumentCaptor;
-
-    private CensusCommand censusCommand;
-
-    @Mock
-    BindingResult bindingResultMock;
-
-    @BeforeEach
-    void setUp() {
-        censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-        stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor2 = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor3 = ArgumentCaptor.forClass(String.class);
-        objectArgumentCaptor = ArgumentCaptor.forClass(Object[].class);
-
-        censusCommand = new CensusCommandImpl();
-        censusCommand.setInhabitedRooms("1");
-        censusCommand.setRoomsWithWindows("1");
-    }
-
-    @Test
-    public void nullDateTest() {
-        censusCommand.setPlace(GetRandomPlace());
-        censusCommand.setBoundaryType(GetRandomCensusBoundaryType());
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("date", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Date must exist.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void nullBoundaryTest() {
-        censusCommand.setPlace(GetRandomPlace());
-        censusCommand.setCensusDate(GetRandomCensusDate());
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("boundaryType", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("The boundary type cannot be null.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void nullPlaceTest() {
-        censusCommand.setCensusDate(GetRandomCensusDate());
-        censusCommand.setBoundaryType(GetRandomCensusBoundaryType());
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("place", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("The place cannot be null.", stringArgumentCaptor3.getValue());
-    }
-
-}

+ 0 - 110
src/test/java/scot/carricksoftware/grants/validators/census/CensusCommandValidatorTotalRoomsTest.java

@@ -1,110 +0,0 @@
-/*
- * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 11:37. All rights reserved.
- *
- */
-
-package scot.carricksoftware.grants.validators.census;
-
-
-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.validation.BindingResult;
-import scot.carricksoftware.grants.commands.census.CensusCommand;
-import scot.carricksoftware.grants.commands.census.CensusCommandImpl;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.mockito.Mockito.atLeast;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoInteractions;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
-import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusDate;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-@ExtendWith(MockitoExtension.class)
-class CensusCommandValidatorTotalRoomsTest {
-
-    private CensusCommandValidatorImpl censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-
-    private ArgumentCaptor<String> stringArgumentCaptor;
-    private ArgumentCaptor<String> stringArgumentCaptor2;
-    private ArgumentCaptor<String> stringArgumentCaptor3;
-    private ArgumentCaptor<Object[]> objectArgumentCaptor;
-
-    private CensusCommand censusCommand;
-
-    @Mock
-    BindingResult bindingResultMock;
-
-    @BeforeEach
-    void setUp() {
-        censusCommandValidatorImpl = new CensusCommandValidatorImpl();
-        stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor2 = ArgumentCaptor.forClass(String.class);
-        stringArgumentCaptor3 = ArgumentCaptor.forClass(String.class);
-        objectArgumentCaptor = ArgumentCaptor.forClass(Object[].class);
-
-        censusCommand = new CensusCommandImpl();
-        censusCommand.setPlace(GetRandomPlace());
-        censusCommand.setCensusDate(GetRandomCensusDate());
-        censusCommand.setBoundaryType(GetRandomCensusBoundaryType());
-    }
-
-    @Test
-    public void validateTotalNegativeTest() {
-        censusCommand.setTotalRooms("-1");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("totalRooms", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void validateTotalNonNumberTest() {
-        censusCommand.setTotalRooms("z");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-        assertEquals("totalRooms", stringArgumentCaptor.getValue());
-        assertEquals("", stringArgumentCaptor2.getValue());
-        assertNull(objectArgumentCaptor.getValue());
-        assertEquals("Not a non negative integer.", stringArgumentCaptor3.getValue());
-    }
-
-    @Test
-    public void validateTotalRoomsValidNumberTest() {
-        censusCommand.setTotalRooms("3");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verifyNoInteractions(bindingResultMock);
-    }
-
-    @Test
-    public void validateTotalRoomsAndInhabitedRoomsTest() {
-        censusCommand.setTotalRooms("3");
-        censusCommand.setInhabitedRooms("3");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-
-        assertTrue(stringArgumentCaptor.getAllValues().contains("totalRooms"));
-        assertTrue(stringArgumentCaptor.getAllValues().contains("inhabitedRooms"));
-    }
-
-    @Test
-    public void validateTotalRoomsAndRoomsWithWindowsTest() {
-        censusCommand.setTotalRooms("3");
-        censusCommand.setRoomsWithWindows("3");
-        censusCommandValidatorImpl.validate(censusCommand, bindingResultMock);
-        verify(bindingResultMock, atLeast(1)).rejectValue(stringArgumentCaptor.capture(), stringArgumentCaptor2.capture(), objectArgumentCaptor.capture(), stringArgumentCaptor3.capture());
-
-        assertTrue(stringArgumentCaptor.getAllValues().contains("totalRooms"));
-        assertTrue(stringArgumentCaptor.getAllValues().contains("roomsWithWindows"));
-    }
-
-
-}

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorBirthDayDayTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthDayDayTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.*;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorBirthDayMonthTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthDayMonthTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -15,6 +15,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoInteractions;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorBirthYearAndAgeTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthYearAndAgeTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorBirthYearTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorBirthYearTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorChildrenBornAliveTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenBornAliveTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorChildrenStillAliveTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenStillAliveTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorChildrenStillWhoHaveDiedTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorChildrenStillWhoHaveDiedTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorNameTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorNameTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoInteractions;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;

+ 3 - 2
src/test/java/scot/carricksoftware/grants/validators/census/CensusEntryCommandValidatorYearsCompletedMarriageTest.java → src/test/java/scot/carricksoftware/grants/validators/census/censusentry/CensusEntryCommandValidatorYearsCompletedMarriageTest.java

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 09:07. All rights reserved.
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
  *
  */
 
-package scot.carricksoftware.grants.validators.census;
+package scot.carricksoftware.grants.validators.census.censusentry;
 
 
 import org.junit.jupiter.api.BeforeEach;
@@ -16,6 +16,7 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.commands.census.CensusEntryCommandImpl;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
+import scot.carricksoftware.grants.validators.census.CensusEntryCommandValidatorImpl;
 
 import static org.mockito.Mockito.verify;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;