فهرست منبع

Census Boundary Type added to converters test

Andrew Grant 7 ماه پیش
والد
کامیت
402e760587

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

@@ -12,12 +12,14 @@ import scot.carricksoftware.grants.commands.census.CensusCommandImpl;
 import scot.carricksoftware.grants.domains.census.Census;
 import scot.carricksoftware.grants.domains.census.CensusEntry;
 import scot.carricksoftware.grants.domains.places.Place;
+import scot.carricksoftware.grants.enums.census.CensusBoundaryType;
 
 import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensusEntry;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
 import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
@@ -38,11 +40,13 @@ class CensusCommandConverterTest {
         List<CensusEntry> censusEntries = new ArrayList<>();
         censusEntries.add(GetRandomCensusEntry());
         Place place = GetRandomPlace();
+        CensusBoundaryType boundaryType = GetRandomCensusBoundaryType();
 
         source.setId(id);
         source.setDate(date);
         source.setCensusEntries(censusEntries);
         source.setPlace(place);
+        source.setBoundaryType(boundaryType);
 
         Census target = converter.convert(source);
 
@@ -51,5 +55,6 @@ class CensusCommandConverterTest {
         assertEquals(date, target.getDate());
         assertEquals(censusEntries, target.getCensusEntries());
         assertEquals(place, target.getPlace());
+        assertEquals(boundaryType, target.getBoundaryType());
     }
 }

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

@@ -11,12 +11,14 @@ import scot.carricksoftware.grants.commands.census.CensusCommand;
 import scot.carricksoftware.grants.domains.census.Census;
 import scot.carricksoftware.grants.domains.census.CensusEntry;
 import scot.carricksoftware.grants.domains.places.Place;
+import scot.carricksoftware.grants.enums.census.CensusBoundaryType;
 
 import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static scot.carricksoftware.grants.GenerateCensusRandomEnums.GetRandomCensusBoundaryType;
 import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensusEntry;
 import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
 import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
@@ -38,11 +40,14 @@ class CensusConverterTest {
         List<CensusEntry> censusEntries = new ArrayList<>();
         censusEntries.add(GetRandomCensusEntry());
         Place place = GetRandomPlace();
+        CensusBoundaryType boundaryType = GetRandomCensusBoundaryType();
+
 
         source.setId(id);
         source.setDate(date);
         source.setCensusEntries(censusEntries);
         source.setPlace(place);
+        source.setBoundaryType(boundaryType);
 
         CensusCommand target = converter.convert(source);
 
@@ -51,5 +56,6 @@ class CensusConverterTest {
         assertEquals(date, target.getDate());
         assertEquals(censusEntries, target.getCensusEntries());
         assertEquals(place, target.getPlace());
+        assertEquals(boundaryType, target.getBoundaryType());
     }
 }