|
|
@@ -10,8 +10,10 @@ import org.junit.jupiter.api.Test;
|
|
|
import scot.carricksoftware.grants.commands.places.places.PlaceCommand;
|
|
|
import scot.carricksoftware.grants.commands.places.places.PlaceCommandImpl;
|
|
|
import scot.carricksoftware.grants.domains.census.Census;
|
|
|
+import scot.carricksoftware.grants.domains.images.PlaceImage;
|
|
|
import scot.carricksoftware.grants.domains.places.Place;
|
|
|
import scot.carricksoftware.grants.domains.places.Region;
|
|
|
+import scot.carricksoftware.grants.domains.text.PlaceText;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
@@ -19,8 +21,10 @@ import java.util.List;
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomCensusValues.GetRandomCensus;
|
|
|
+import static scot.carricksoftware.grants.GenerateRandomImageValues.GetRandomPlaceImage;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomRegion;
|
|
|
+import static scot.carricksoftware.grants.GenerateRandomTextValues.GetRandomPlaceText;
|
|
|
|
|
|
|
|
|
public class PlaceCommandConverterImplTest {
|
|
|
@@ -40,12 +44,18 @@ public class PlaceCommandConverterImplTest {
|
|
|
Region region = GetRandomRegion();
|
|
|
List<Census> censuses = new ArrayList<>();
|
|
|
censuses.add(GetRandomCensus());
|
|
|
+ List<PlaceImage> placeImages = new ArrayList<>();
|
|
|
+ placeImages.add(GetRandomPlaceImage());
|
|
|
+ List<PlaceText> placeTexts = new ArrayList<>();
|
|
|
+ placeTexts.add(GetRandomPlaceText());
|
|
|
|
|
|
source.setCensuses(censuses);
|
|
|
source.setId(id);
|
|
|
source.setName(name);
|
|
|
source.setRegion(region);
|
|
|
source.setCensuses(censuses);
|
|
|
+ source.setPlaceTexts(placeTexts);
|
|
|
+ source.setPlaceImages(placeImages);
|
|
|
|
|
|
Place target = converter.convert(source);
|
|
|
|
|
|
@@ -54,5 +64,7 @@ public class PlaceCommandConverterImplTest {
|
|
|
assertEquals(name, target.getName());
|
|
|
assertEquals(region, target.getRegion());
|
|
|
assertEquals(censuses, target.getCensuses());
|
|
|
+ assertEquals(placeTexts, target.getPlaceTexts());
|
|
|
+ assertEquals(placeImages, target.getPlaceImages());
|
|
|
}
|
|
|
}
|