Browse Source

Working at home and Industry or Service added to CensusEntry bootstrap

Andrew Grant 6 months ago
parent
commit
d3ef6f3aa9

+ 3 - 0
src/main/java/scot/carricksoftware/grants/bootstrap/DataLoadCensus.java

@@ -17,6 +17,7 @@ import scot.carricksoftware.grants.domains.places.Place;
 import scot.carricksoftware.grants.enums.census.CensusBoundaryType;
 import scot.carricksoftware.grants.enums.census.CensusDate;
 import scot.carricksoftware.grants.enums.censusentry.*;
+import scot.carricksoftware.grants.enums.general.YesNo;
 import scot.carricksoftware.grants.services.census.censusentry.CensusEntryService;
 import scot.carricksoftware.grants.services.census.census.CensusService;
 import scot.carricksoftware.grants.services.people.PersonService;
@@ -90,6 +91,8 @@ public class DataLoadCensus {
         censusEntryCommand.setChildrenStillAlive("3");
         censusEntryCommand.setChildrenWhoHaveDied("1");
         censusEntryCommand.setYearsCompletedMarriage("13");
+        censusEntryCommand.setIndustryOrService("Chauffeur");
+        censusEntryCommand.setWorkingAtHome(YesNo.NO);
 
         censusEntryService.saveCensusEntryCommand(censusEntryCommand);
     }

+ 3 - 0
src/test/java/scot/carricksoftware/grants/bootstrap/DataLoadCensusTest.java

@@ -14,6 +14,7 @@ import scot.carricksoftware.grants.domains.places.Place;
 import scot.carricksoftware.grants.enums.census.CensusBoundaryType;
 import scot.carricksoftware.grants.enums.census.CensusDate;
 import scot.carricksoftware.grants.enums.censusentry.*;
+import scot.carricksoftware.grants.enums.general.YesNo;
 import scot.carricksoftware.grants.services.census.censusentry.CensusEntryService;
 import scot.carricksoftware.grants.services.census.census.CensusService;
 import scot.carricksoftware.grants.services.people.PersonService;
@@ -104,6 +105,8 @@ public class DataLoadCensusTest {
         assertEquals("3", captor.getValue().getChildrenStillAlive());
         assertEquals("1", captor.getValue().getChildrenWhoHaveDied());
         assertEquals("13", captor.getValue().getYearsCompletedMarriage());
+        assertEquals("Chauffeur", captor.getValue().getIndustryOrService());
+        assertEquals(YesNo.NO, captor.getValue().getWorkingAtHome());
 
     }