Эх сурвалжийг харах

CensusEntry Gaelic added to converters

Andrew Grant 5 сар өмнө
parent
commit
9e46b2e994

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

@@ -22,6 +22,7 @@ public class CensusEntryCommandConverterImpl implements CensusEntryCommandConver
         result.setPerson(source.getPerson());
         result.setRelationship(source.getRelationship());
         result.setCondition(source.getCondition());
+        result.setGaelic(source.getGaelic());
         return result;
     }
 

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

@@ -23,6 +23,7 @@ public class CensusEntryConverterImpl implements CensusEntryConverter {
         result.setPerson(source.getPerson());
         result.setRelationship(source.getRelationship());
         result.setCondition(source.getCondition());
+        result.setGaelic(source.getGaelic());
         return result;
     }
 }

+ 5 - 3
src/test/java/scot/carricksoftware/grants/converters/census/CensusEntryCommandConverterTest.java

@@ -13,11 +13,11 @@ import scot.carricksoftware.grants.domains.census.Census;
 import scot.carricksoftware.grants.domains.census.CensusEntry;
 import scot.carricksoftware.grants.domains.people.Person;
 import scot.carricksoftware.grants.enums.censusentry.CensusEntryCondition;
+import scot.carricksoftware.grants.enums.censusentry.CensusEntryGaelic;
 import scot.carricksoftware.grants.enums.censusentry.CensusEntryRelationship;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.GetRandomCensusEntryCondition;
-import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.GetRandomCensusEntryRelationship;
+import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.*;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
@@ -38,6 +38,7 @@ class CensusEntryCommandConverterTest {
         String name = GetRandomString();
         CensusEntryRelationship relationship = GetRandomCensusEntryRelationship();
         CensusEntryCondition condition = GetRandomCensusEntryCondition();
+        CensusEntryGaelic gaelic = GetRandomCensusEntryGaelic();
         CensusEntryCommand source = new CensusEntryCommandImpl();
         Census census = GetRandomCensus();
         Person person = GetRandomPerson();
@@ -49,7 +50,7 @@ class CensusEntryCommandConverterTest {
         source.setPerson(person);
         source.setRelationship(relationship);
         source.setCondition(condition);
-
+        source.setGaelic(gaelic);
 
         CensusEntry target = converter.convert(source);
 
@@ -60,5 +61,6 @@ class CensusEntryCommandConverterTest {
         assertEquals(person, target.getPerson());
         assertEquals(relationship, target.getRelationship());
         assertEquals(condition, target.getCondition());
+        assertEquals(gaelic, target.getGaelic());
     }
 }

+ 5 - 2
src/test/java/scot/carricksoftware/grants/converters/census/CensusEntryConverterTest.java

@@ -11,12 +11,12 @@ import scot.carricksoftware.grants.commands.census.CensusEntryCommand;
 import scot.carricksoftware.grants.domains.census.Census;
 import scot.carricksoftware.grants.domains.census.CensusEntry;
 import scot.carricksoftware.grants.domains.people.Person;
+import scot.carricksoftware.grants.enums.censusentry.CensusEntryGaelic;
 import scot.carricksoftware.grants.enums.censusentry.CensusEntryRelationship;
 import scot.carricksoftware.grants.enums.censusentry.CensusEntryCondition;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.GetRandomCensusEntryCondition;
-import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.GetRandomCensusEntryRelationship;
+import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.*;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
@@ -39,6 +39,7 @@ class CensusEntryConverterTest {
         CensusEntry source = new CensusEntry();
         CensusEntryRelationship relationship = GetRandomCensusEntryRelationship();
         CensusEntryCondition condition = GetRandomCensusEntryCondition();
+        CensusEntryGaelic gaelic = GetRandomCensusEntryGaelic();
         Person person = GetRandomPerson();
 
         source.setId(id);
@@ -47,6 +48,7 @@ class CensusEntryConverterTest {
         source.setPerson(person);
         source.setRelationship(relationship);
         source.setCondition(condition);
+        source.setGaelic(gaelic);
 
         CensusEntryCommand target = converter.convert(source);
 
@@ -57,5 +59,6 @@ class CensusEntryConverterTest {
         assertEquals(person, target.getPerson());
         assertEquals(relationship, target.getRelationship());
         assertEquals(condition, target.getCondition());
+        assertEquals(gaelic, target.getGaelic());
     }
 }