Browse Source

FilledInBy added to census converter

Andrew Grant 7 months ago
parent
commit
ff63146c62

+ 1 - 0
src/main/java/scot/carricksoftware/grants/converters/census/CensusCommandConverterImpl.java

@@ -24,6 +24,7 @@ public class CensusCommandConverterImpl implements CensusCommandConverter {
         result.setCensusDate(source.getCensusDate());
         result.setInhabitedRooms(source.getInhabitedRooms());
         result.setRoomsWithWindows(source.getRoomsWithWindows());
+        result.setFilledInBy(source.getFilledInBy());
 
 
         return result;

+ 1 - 0
src/main/java/scot/carricksoftware/grants/converters/census/CensusConverterImpl.java

@@ -24,6 +24,7 @@ public class CensusConverterImpl implements CensusConverter {
         result.setCensusDate(source.getCensusDate());
         result.setInhabitedRooms(source.getInhabitedRooms());
         result.setRoomsWithWindows(source.getRoomsWithWindows());
+        result.setFilledInBy(source.getFilledInBy());
         return result;
     }
 }

+ 3 - 0
src/test/java/scot/carricksoftware/grants/converters/census/CensusCommandConverterTest.java

@@ -45,6 +45,7 @@ class CensusCommandConverterTest {
         CensusBoundaryType boundaryType = GetRandomCensusBoundaryType();
         String roomsWithWindows = GetRandomString();
         String inhabitedRooms = GetRandomString();
+        String filledInBy = GetRandomString();
 
         source.setId(id);
         source.setCensusDate(censusDate);
@@ -53,6 +54,7 @@ class CensusCommandConverterTest {
         source.setBoundaryType(boundaryType);
         source.setInhabitedRooms(inhabitedRooms);
         source.setRoomsWithWindows(roomsWithWindows);
+        source.setFilledInBy(filledInBy);
 
         Census target = converter.convert(source);
 
@@ -64,5 +66,6 @@ class CensusCommandConverterTest {
         assertEquals(censusDate, target.getCensusDate());
         assertEquals(roomsWithWindows, target.getRoomsWithWindows());
         assertEquals(inhabitedRooms, target.getInhabitedRooms());
+        assertEquals(filledInBy, target.getFilledInBy());
     }
 }

+ 3 - 0
src/test/java/scot/carricksoftware/grants/converters/census/CensusConverterTest.java

@@ -45,6 +45,7 @@ class CensusConverterTest {
         CensusBoundaryType boundaryType = GetRandomCensusBoundaryType();
         String roomsWithWindows = GetRandomString();
         String inhabitedRooms = GetRandomString();
+        String filledInBy = GetRandomString();
 
 
         source.setId(id);
@@ -54,6 +55,7 @@ class CensusConverterTest {
         source.setCensusDate(censusDate);
         source.setInhabitedRooms(inhabitedRooms);
         source.setRoomsWithWindows(roomsWithWindows);
+        source.setFilledInBy(filledInBy);
 
         CensusCommand target = converter.convert(source);
 
@@ -65,5 +67,6 @@ class CensusConverterTest {
         assertEquals(censusDate, target.getCensusDate());
         assertEquals(roomsWithWindows, target.getRoomsWithWindows());
         assertEquals(inhabitedRooms, target.getInhabitedRooms());
+        assertEquals(filledInBy, target.getFilledInBy());
     }
 }