Browse Source

Working at home and Industry or Service added to CensusEntry command (2)

Andrew Grant 6 months ago
parent
commit
7e63f83402

+ 13 - 0
src/test/java/scot/carricksoftware/grants/commands/census/CensusEntryCommandEnumTest.java

@@ -9,10 +9,12 @@ package scot.carricksoftware.grants.commands.census;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import scot.carricksoftware.grants.enums.censusentry.*;
+import scot.carricksoftware.grants.enums.general.YesNo;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.*;
+import static scot.carricksoftware.grants.GenerateGeneralRandomEnums.GetRandomGeneralYesNo;
 
 class CensusEntryCommandEnumTest {
 
@@ -83,6 +85,17 @@ class CensusEntryCommandEnumTest {
         assertEquals(sex, command.getSex());
     }
 
+    @Test
+    void getWorkingAtHomeTest() {
+        assertNull(command.getWorkingAtHome());
+    }
+
+    @Test
+    void setWorkingAtHomeTest() {
+        YesNo workingAtHome = GetRandomGeneralYesNo();
+        command.setWorkingAtHome(workingAtHome);
+        assertEquals(workingAtHome, command.getWorkingAtHome());
+    }
 
 
 

+ 10 - 1
src/test/java/scot/carricksoftware/grants/commands/census/CensusEntryCommandPartThreeTest.java

@@ -70,8 +70,17 @@ class CensusEntryCommandPartThreeTest {
         assertEquals(string, entry.getYearsCompletedMarriage());
     }
 
+    @Test
+    public void getIndustryOrServiceTest() {
+        assertNull(entry.getIndustryOrService());
+    }
 
-
+    @Test
+    public void setIndustryOrServiceTest() {
+        String string = GetRandomString();
+        entry.setIndustryOrService(string);
+        assertEquals(string, entry.getIndustryOrService());
+    }
 
 
 }