From 57e13f5dc41384f072ce58b6d8320075e9e8861f Mon Sep 17 00:00:00 2001 From: mat3e Date: Sat, 25 Jun 2022 02:05:03 +0200 Subject: [PATCH] Introduce 3pigs subpackege --- .../{ => pigs3}/app/AppConfiguration.java | 6 ++--- .../fairytales/{ => pigs3}/app/Jdbc.java | 8 +++--- .../in/console/FairyTaleRunner.java | 10 +++---- .../fairytales/{ => pigs3}/in/rest/Dto.java | 4 +-- .../{ => pigs3}/in/rest/Hateoas.java | 8 +++--- .../in/rest/RestConfiguration.java | 6 ++--- .../in/rest/ThreePigsController.java | 18 ++++++------- .../fairytales/{ => pigs3}/model/Jdbc.java | 12 ++++----- .../{ => pigs3}/model/ModelConfiguration.java | 2 +- .../out/logging/LoggingAspect.java | 22 ++++++++-------- .../{ => pigs3}/app/AppIntegrationTest.java | 10 +++---- .../model/JdbcAdaptersIntegrationTest.java | 15 ++++++----- .../{ => pigs3}/app/HouseQueryRepository.kt | 8 +++--- .../{ => pigs3}/app/ThreePigsApp.kt | 8 +++--- .../app/ThreePigsCommandHandler.kt | 18 ++++++------- .../{ => pigs3}/app/ThreePigsEventHandler.kt | 12 ++++----- .../app/command/ThreePigsCommands.kt | 6 ++--- .../fairytales/{ => pigs3}/app/AppTest.java | 12 ++++----- .../app/ThreePigsCommandHandlerTest.java | 26 +++++++++---------- .../app/ThreePigsEventHandlerTest.java | 16 ++++++------ .../{ => pigs3}/app/ThreePigsTestApp.java | 6 ++--- .../model/InMemoryThreePigsRepository.java | 10 +++---- .../mat3e/fairytales/model/vo/Material.java | 5 ---- .../{ => pigs3}/model/BigBadWolfService.java | 4 +-- .../fairytales/{ => pigs3}/model/House.java | 14 +++++----- .../{ => pigs3}/model/HouseFactory.java | 10 +++---- .../{ => pigs3}/model/HouseRepository.java | 4 +-- .../{ => pigs3}/model/Policies.java | 6 ++--- .../{ => pigs3}/model/Specifications.java | 8 +++--- .../model/event/HouseAbandoned.java | 6 ++--- .../{ => pigs3}/model/event/HouseEvent.java | 4 +-- .../event/WolfResignedFromAttacking.java | 4 +-- .../{ => pigs3}/model/vo/HouseId.java | 2 +- .../{ => pigs3}/model/vo/HouseSnapshot.java | 4 +-- .../fairytales/pigs3/model/vo/Material.java | 5 ++++ .../fairytales/{ => pigs3}/model/vo/Pig.java | 2 +- .../fairytales/model/HouseHelpers.groovy | 14 ---------- .../model/BigBadWolfServiceSpec.groovy | 18 +++++++------ .../model/BuildingPolicySpec.groovy | 6 ++--- .../ConstructionSpecificationSpec.groovy | 4 +-- ...DefaultBlowingDownSpecificationSpec.groovy | 4 +-- .../{ => pigs3}/model/HouseFactorySpec.groovy | 6 ++--- .../pigs3/model/HouseHelpers.groovy | 17 ++++++++++++ .../{ => pigs3}/model/HouseSpec.groovy | 19 +++++++------- .../{ => pigs3}/model/vo/HouseIdSpec.groovy | 2 +- .../model/vo/HouseSnapshotSpec.groovy | 2 +- .../{ => pigs3}/model/vo/PigSpec.groovy | 4 +-- 47 files changed, 212 insertions(+), 205 deletions(-) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/app/AppConfiguration.java (87%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/app/Jdbc.java (89%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/in/console/FairyTaleRunner.java (80%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/in/rest/Dto.java (76%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/in/rest/Hateoas.java (85%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/in/rest/RestConfiguration.java (86%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/in/rest/ThreePigsController.java (79%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/Jdbc.java (89%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/ModelConfiguration.java (95%) rename adapters/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/out/logging/LoggingAspect.java (85%) rename adapters/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/app/AppIntegrationTest.java (88%) rename adapters/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/model/JdbcAdaptersIntegrationTest.java (77%) rename app/src/main/kotlin/io/github/mat3e/fairytales/{ => pigs3}/app/HouseQueryRepository.kt (59%) rename app/src/main/kotlin/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsApp.kt (67%) rename app/src/main/kotlin/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsCommandHandler.kt (77%) rename app/src/main/kotlin/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsEventHandler.kt (58%) rename app/src/main/kotlin/io/github/mat3e/fairytales/{ => pigs3}/app/command/ThreePigsCommands.kt (87%) rename app/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/app/AppTest.java (89%) rename app/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsCommandHandlerTest.java (85%) rename app/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsEventHandlerTest.java (79%) rename app/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/app/ThreePigsTestApp.java (87%) rename app/src/test/java/io/github/mat3e/fairytales/{ => pigs3}/model/InMemoryThreePigsRepository.java (84%) delete mode 100644 domain/src/main/java/io/github/mat3e/fairytales/model/vo/Material.java rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/BigBadWolfService.java (90%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/House.java (88%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/HouseFactory.java (57%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/HouseRepository.java (61%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/Policies.java (83%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/Specifications.java (81%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/event/HouseAbandoned.java (75%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/event/HouseEvent.java (61%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/event/WolfResignedFromAttacking.java (66%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/vo/HouseId.java (87%) rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/vo/HouseSnapshot.java (87%) create mode 100644 domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Material.java rename domain/src/main/java/io/github/mat3e/fairytales/{ => pigs3}/model/vo/Pig.java (90%) delete mode 100644 domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseHelpers.groovy rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/BigBadWolfServiceSpec.groovy (73%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/BuildingPolicySpec.groovy (74%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/ConstructionSpecificationSpec.groovy (88%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/DefaultBlowingDownSpecificationSpec.groovy (83%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/HouseFactorySpec.groovy (80%) create mode 100644 domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseHelpers.groovy rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/HouseSpec.groovy (75%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/vo/HouseIdSpec.groovy (82%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/vo/HouseSnapshotSpec.groovy (85%) rename domain/src/test/groovy/io/github/mat3e/fairytales/{ => pigs3}/model/vo/PigSpec.groovy (82%) diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/app/AppConfiguration.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/AppConfiguration.java similarity index 87% rename from adapters/src/main/java/io/github/mat3e/fairytales/app/AppConfiguration.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/AppConfiguration.java index e40e1c7..a1cd6a4 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/app/AppConfiguration.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/AppConfiguration.java @@ -1,8 +1,8 @@ -package io.github.mat3e.fairytales.app; +package io.github.mat3e.fairytales.pigs3.app; import io.github.mat3e.ddd.event.DomainEventPublisher; -import io.github.mat3e.fairytales.model.HouseRepository; -import io.github.mat3e.fairytales.model.event.HouseEvent; +import io.github.mat3e.fairytales.pigs3.model.HouseRepository; +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/app/Jdbc.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/Jdbc.java similarity index 89% rename from adapters/src/main/java/io/github/mat3e/fairytales/app/Jdbc.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/Jdbc.java index e62c290..225ca53 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/app/Jdbc.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/app/Jdbc.java @@ -1,8 +1,8 @@ -package io.github.mat3e.fairytales.app; +package io.github.mat3e.fairytales.pigs3.app; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.jetbrains.annotations.NotNull; import org.springframework.data.annotation.Id; import org.springframework.data.jdbc.repository.query.Query; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/in/console/FairyTaleRunner.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/console/FairyTaleRunner.java similarity index 80% rename from adapters/src/main/java/io/github/mat3e/fairytales/in/console/FairyTaleRunner.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/console/FairyTaleRunner.java index ac8f21b..2435570 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/in/console/FairyTaleRunner.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/console/FairyTaleRunner.java @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.in.console; +package io.github.mat3e.fairytales.pigs3.in.console; -import io.github.mat3e.fairytales.app.ThreePigsCommandHandler; -import io.github.mat3e.fairytales.app.command.BlowDown; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.app.ThreePigsCommandHandler; +import io.github.mat3e.fairytales.pigs3.app.command.BlowDown; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Dto.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Dto.java similarity index 76% rename from adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Dto.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Dto.java index 28d16ff..9295457 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Dto.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Dto.java @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.in.rest; +package io.github.mat3e.fairytales.pigs3.in.rest; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; abstract class BuildHouseJson { @JsonCreator diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Hateoas.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Hateoas.java similarity index 85% rename from adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Hateoas.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Hateoas.java index ad53284..d8bb479 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/Hateoas.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/Hateoas.java @@ -1,8 +1,8 @@ -package io.github.mat3e.fairytales.in.rest; +package io.github.mat3e.fairytales.pigs3.in.rest; -import io.github.mat3e.fairytales.app.HouseReadModel; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.app.HouseReadModel; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; import org.jetbrains.annotations.NotNull; import org.springframework.hateoas.EntityModel; import org.springframework.hateoas.IanaLinkRelations; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/RestConfiguration.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/RestConfiguration.java similarity index 86% rename from adapters/src/main/java/io/github/mat3e/fairytales/in/rest/RestConfiguration.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/RestConfiguration.java index 95cdd00..008b336 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/RestConfiguration.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/RestConfiguration.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.in.rest; +package io.github.mat3e.fairytales.pigs3.in.rest; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.context.annotation.Bean; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/ThreePigsController.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/ThreePigsController.java similarity index 79% rename from adapters/src/main/java/io/github/mat3e/fairytales/in/rest/ThreePigsController.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/ThreePigsController.java index 95f300f..b5c082e 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/in/rest/ThreePigsController.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/in/rest/ThreePigsController.java @@ -1,12 +1,12 @@ -package io.github.mat3e.fairytales.in.rest; - -import io.github.mat3e.fairytales.app.HouseNotFoundException; -import io.github.mat3e.fairytales.app.HouseQueryRepository; -import io.github.mat3e.fairytales.app.HouseReadModel; -import io.github.mat3e.fairytales.app.ThreePigsCommandHandler; -import io.github.mat3e.fairytales.app.command.BlowDown; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.HouseId; +package io.github.mat3e.fairytales.pigs3.in.rest; + +import io.github.mat3e.fairytales.pigs3.app.HouseNotFoundException; +import io.github.mat3e.fairytales.pigs3.app.HouseQueryRepository; +import io.github.mat3e.fairytales.pigs3.app.HouseReadModel; +import io.github.mat3e.fairytales.pigs3.app.ThreePigsCommandHandler; +import io.github.mat3e.fairytales.pigs3.app.command.BlowDown; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.hateoas.EntityModel; import org.springframework.http.ResponseEntity; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/model/Jdbc.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/Jdbc.java similarity index 89% rename from adapters/src/main/java/io/github/mat3e/fairytales/model/Jdbc.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/Jdbc.java index 81ca797..16ba0ea 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/model/Jdbc.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/Jdbc.java @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; -import io.github.mat3e.fairytales.model.event.HouseEvent; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Transient; import org.springframework.data.domain.AfterDomainEventPublication; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/model/ModelConfiguration.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/ModelConfiguration.java similarity index 95% rename from adapters/src/main/java/io/github/mat3e/fairytales/model/ModelConfiguration.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/ModelConfiguration.java index dbeba7a..0778352 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/model/ModelConfiguration.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/model/ModelConfiguration.java @@ -1,4 +1,4 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.event.DomainEvent; import io.github.mat3e.ddd.event.DomainEventPublisher; diff --git a/adapters/src/main/java/io/github/mat3e/fairytales/out/logging/LoggingAspect.java b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/out/logging/LoggingAspect.java similarity index 85% rename from adapters/src/main/java/io/github/mat3e/fairytales/out/logging/LoggingAspect.java rename to adapters/src/main/java/io/github/mat3e/fairytales/pigs3/out/logging/LoggingAspect.java index 7cfb8f5..a950dcf 100644 --- a/adapters/src/main/java/io/github/mat3e/fairytales/out/logging/LoggingAspect.java +++ b/adapters/src/main/java/io/github/mat3e/fairytales/pigs3/out/logging/LoggingAspect.java @@ -1,11 +1,11 @@ -package io.github.mat3e.fairytales.out.logging; - -import io.github.mat3e.fairytales.app.HouseQueryRepository; -import io.github.mat3e.fairytales.app.HouseReadModel; -import io.github.mat3e.fairytales.app.command.BlowDown; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.event.WolfResignedFromAttacking; -import io.github.mat3e.fairytales.model.vo.HouseId; +package io.github.mat3e.fairytales.pigs3.out.logging; + +import io.github.mat3e.fairytales.pigs3.app.HouseQueryRepository; +import io.github.mat3e.fairytales.pigs3.app.HouseReadModel; +import io.github.mat3e.fairytales.pigs3.app.command.BlowDown; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.event.WolfResignedFromAttacking; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; import org.aspectj.lang.annotation.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,15 +24,15 @@ class LoggingAspect { logger.info("Once upon a time, there were three little pigs"); } - @Pointcut(value = "execution(* io.github.mat3e.fairytales.app.ThreePigsCommandHandler.handle(..)) && args(command)", argNames = "command") + @Pointcut(value = "execution(* io.github.mat3e.fairytales.pigs3.app.ThreePigsCommandHandler.handle(..)) && args(command)", argNames = "command") static void buildingHouse(BuildHouse command) { } - @Pointcut(value = "execution(* io.github.mat3e.fairytales.app.ThreePigsCommandHandler.handle(..)) && args(command)", argNames = "command") + @Pointcut(value = "execution(* io.github.mat3e.fairytales.pigs3.app.ThreePigsCommandHandler.handle(..)) && args(command)", argNames = "command") static void wolfBlowing(BlowDown command) { } - @Pointcut("execution(* io.github.mat3e.fairytales.app.HouseQueryRepository.findClosestTo(..))") + @Pointcut("execution(* io.github.mat3e.fairytales.pigs3.app.HouseQueryRepository.findClosestTo(..))") static void findingNearestHouse() { } diff --git a/adapters/src/test/java/io/github/mat3e/fairytales/app/AppIntegrationTest.java b/adapters/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppIntegrationTest.java similarity index 88% rename from adapters/src/test/java/io/github/mat3e/fairytales/app/AppIntegrationTest.java rename to adapters/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppIntegrationTest.java index b3504f5..52f0a9a 100644 --- a/adapters/src/test/java/io/github/mat3e/fairytales/app/AppIntegrationTest.java +++ b/adapters/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppIntegrationTest.java @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.app; +package io.github.mat3e.fairytales.pigs3.app; -import io.github.mat3e.fairytales.app.command.BlowDown; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.app.command.BlowDown; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/adapters/src/test/java/io/github/mat3e/fairytales/model/JdbcAdaptersIntegrationTest.java b/adapters/src/test/java/io/github/mat3e/fairytales/pigs3/model/JdbcAdaptersIntegrationTest.java similarity index 77% rename from adapters/src/test/java/io/github/mat3e/fairytales/model/JdbcAdaptersIntegrationTest.java rename to adapters/src/test/java/io/github/mat3e/fairytales/pigs3/model/JdbcAdaptersIntegrationTest.java index 57d2d85..0010b0a 100644 --- a/adapters/src/test/java/io/github/mat3e/fairytales/model/JdbcAdaptersIntegrationTest.java +++ b/adapters/src/test/java/io/github/mat3e/fairytales/pigs3/model/JdbcAdaptersIntegrationTest.java @@ -1,10 +1,11 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; -import io.github.mat3e.fairytales.model.event.HouseAbandoned; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.event.HouseAbandoned; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @@ -45,6 +46,6 @@ void saveAndRead_worksAsExpected() { .usingRecursiveComparison() .ignoringFields("id", "events") .isEqualTo(snapshot); - assertThat(result.events()).isEmpty(); + Assertions.assertThat(result.events()).isEmpty(); } } diff --git a/app/src/main/kotlin/io/github/mat3e/fairytales/app/HouseQueryRepository.kt b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/HouseQueryRepository.kt similarity index 59% rename from app/src/main/kotlin/io/github/mat3e/fairytales/app/HouseQueryRepository.kt rename to app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/HouseQueryRepository.kt index 298cfbd..aad4f50 100644 --- a/app/src/main/kotlin/io/github/mat3e/fairytales/app/HouseQueryRepository.kt +++ b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/HouseQueryRepository.kt @@ -1,8 +1,8 @@ -package io.github.mat3e.fairytales.app +package io.github.mat3e.fairytales.pigs3.app -import io.github.mat3e.fairytales.model.vo.HouseId -import io.github.mat3e.fairytales.model.vo.Material -import io.github.mat3e.fairytales.model.vo.Pig +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId +import io.github.mat3e.fairytales.pigs3.model.vo.Material +import io.github.mat3e.fairytales.pigs3.model.vo.Pig import java.util.* interface HouseQueryRepository { diff --git a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsApp.kt b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsApp.kt similarity index 67% rename from app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsApp.kt rename to app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsApp.kt index 82c585d..4e03753 100644 --- a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsApp.kt +++ b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsApp.kt @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.app +package io.github.mat3e.fairytales.pigs3.app import io.github.mat3e.ddd.event.DomainEventPublisher -import io.github.mat3e.fairytales.model.BigBadWolfService -import io.github.mat3e.fairytales.model.HouseFactory -import io.github.mat3e.fairytales.model.HouseRepository +import io.github.mat3e.fairytales.pigs3.model.BigBadWolfService +import io.github.mat3e.fairytales.pigs3.model.HouseFactory +import io.github.mat3e.fairytales.pigs3.model.HouseRepository // accepting just IO adapters class ThreePigsApp( diff --git a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsCommandHandler.kt b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandler.kt similarity index 77% rename from app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsCommandHandler.kt rename to app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandler.kt index 2c3966f..9c8db16 100644 --- a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsCommandHandler.kt +++ b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandler.kt @@ -1,13 +1,13 @@ -package io.github.mat3e.fairytales.app +package io.github.mat3e.fairytales.pigs3.app -import io.github.mat3e.fairytales.app.command.* -import io.github.mat3e.fairytales.model.BigBadWolfService -import io.github.mat3e.fairytales.model.House -import io.github.mat3e.fairytales.model.HouseFactory -import io.github.mat3e.fairytales.model.HouseRepository -import io.github.mat3e.fairytales.model.vo.HouseId -import io.github.mat3e.fairytales.model.vo.HouseSnapshot -import io.github.mat3e.fairytales.model.vo.Pig +import io.github.mat3e.fairytales.pigs3.app.command.* +import io.github.mat3e.fairytales.pigs3.model.BigBadWolfService +import io.github.mat3e.fairytales.pigs3.model.House +import io.github.mat3e.fairytales.pigs3.model.HouseFactory +import io.github.mat3e.fairytales.pigs3.model.HouseRepository +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot +import io.github.mat3e.fairytales.pigs3.model.vo.Pig // seems kotlin-allopen has no effect when annotations are added in the other module open class ThreePigsCommandHandler( diff --git a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsEventHandler.kt b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandler.kt similarity index 58% rename from app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsEventHandler.kt rename to app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandler.kt index 1248b30..6ae6bd4 100644 --- a/app/src/main/kotlin/io/github/mat3e/fairytales/app/ThreePigsEventHandler.kt +++ b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandler.kt @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.app +package io.github.mat3e.fairytales.pigs3.app -import io.github.mat3e.fairytales.app.command.Enter -import io.github.mat3e.fairytales.app.command.ShareKnowledge -import io.github.mat3e.fairytales.model.event.HouseAbandoned -import io.github.mat3e.fairytales.model.event.HouseEvent -import io.github.mat3e.fairytales.model.event.WolfResignedFromAttacking +import io.github.mat3e.fairytales.pigs3.app.command.Enter +import io.github.mat3e.fairytales.pigs3.app.command.ShareKnowledge +import io.github.mat3e.fairytales.pigs3.model.event.HouseAbandoned +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent +import io.github.mat3e.fairytales.pigs3.model.event.WolfResignedFromAttacking class ThreePigsEventHandler( private val queryRepository: HouseQueryRepository, diff --git a/app/src/main/kotlin/io/github/mat3e/fairytales/app/command/ThreePigsCommands.kt b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/command/ThreePigsCommands.kt similarity index 87% rename from app/src/main/kotlin/io/github/mat3e/fairytales/app/command/ThreePigsCommands.kt rename to app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/command/ThreePigsCommands.kt index 33a5233..795df6f 100644 --- a/app/src/main/kotlin/io/github/mat3e/fairytales/app/command/ThreePigsCommands.kt +++ b/app/src/main/kotlin/io/github/mat3e/fairytales/pigs3/app/command/ThreePigsCommands.kt @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.app.command +package io.github.mat3e.fairytales.pigs3.app.command -import io.github.mat3e.fairytales.model.vo.HouseId -import io.github.mat3e.fairytales.model.vo.Pig +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId +import io.github.mat3e.fairytales.pigs3.model.vo.Pig sealed class ThreePigsCommand { override fun toString(): String = javaClass.simpleName.toString() diff --git a/app/src/test/java/io/github/mat3e/fairytales/app/AppTest.java b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppTest.java similarity index 89% rename from app/src/test/java/io/github/mat3e/fairytales/app/AppTest.java rename to app/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppTest.java index d4824bf..e001a30 100644 --- a/app/src/test/java/io/github/mat3e/fairytales/app/AppTest.java +++ b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/AppTest.java @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.app; +package io.github.mat3e.fairytales.pigs3.app; -import io.github.mat3e.fairytales.app.command.BlowDown; -import io.github.mat3e.fairytales.app.command.BuildHouse; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.app.command.BlowDown; +import io.github.mat3e.fairytales.pigs3.app.command.BuildHouse; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; diff --git a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsCommandHandlerTest.java b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandlerTest.java similarity index 85% rename from app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsCommandHandlerTest.java rename to app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandlerTest.java index f4f4d5d..67bb089 100644 --- a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsCommandHandlerTest.java +++ b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsCommandHandlerTest.java @@ -1,14 +1,14 @@ -package io.github.mat3e.fairytales.app; - -import io.github.mat3e.fairytales.app.command.*; -import io.github.mat3e.fairytales.model.BigBadWolfService; -import io.github.mat3e.fairytales.model.House; -import io.github.mat3e.fairytales.model.HouseFactory; -import io.github.mat3e.fairytales.model.HouseRepository; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +package io.github.mat3e.fairytales.pigs3.app; + +import io.github.mat3e.fairytales.pigs3.app.command.*; +import io.github.mat3e.fairytales.pigs3.model.BigBadWolfService; +import io.github.mat3e.fairytales.pigs3.model.House; +import io.github.mat3e.fairytales.pigs3.model.HouseFactory; +import io.github.mat3e.fairytales.pigs3.model.HouseRepository; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -80,8 +80,8 @@ void validCommand_shouldSaveUpdatedHouse(ThreePigsCommand command) { static Stream validCommand_shouldSaveUpdatedHouse() { return Stream.of( - arguments(new Enter(List.of(Pig.LAZY), HouseId.of(999))), - arguments(new ShareKnowledge(HouseId.of(999))) + Arguments.arguments(new Enter(List.of(Pig.LAZY), HouseId.of(999))), + Arguments.arguments(new ShareKnowledge(HouseId.of(999))) ); } diff --git a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsEventHandlerTest.java b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandlerTest.java similarity index 79% rename from app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsEventHandlerTest.java rename to app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandlerTest.java index 21b9f51..ab5b81b 100644 --- a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsEventHandlerTest.java +++ b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsEventHandlerTest.java @@ -1,11 +1,11 @@ -package io.github.mat3e.fairytales.app; - -import io.github.mat3e.fairytales.model.BigBadWolfService; -import io.github.mat3e.fairytales.model.HouseFactory; -import io.github.mat3e.fairytales.model.HouseRepository; -import io.github.mat3e.fairytales.model.event.HouseAbandoned; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.Pig; +package io.github.mat3e.fairytales.pigs3.app; + +import io.github.mat3e.fairytales.pigs3.model.BigBadWolfService; +import io.github.mat3e.fairytales.pigs3.model.HouseFactory; +import io.github.mat3e.fairytales.pigs3.model.HouseRepository; +import io.github.mat3e.fairytales.pigs3.model.event.HouseAbandoned; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsTestApp.java b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsTestApp.java similarity index 87% rename from app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsTestApp.java rename to app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsTestApp.java index dfe0090..73d311a 100644 --- a/app/src/test/java/io/github/mat3e/fairytales/app/ThreePigsTestApp.java +++ b/app/src/test/java/io/github/mat3e/fairytales/pigs3/app/ThreePigsTestApp.java @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.app; +package io.github.mat3e.fairytales.pigs3.app; import io.github.mat3e.ddd.event.DomainEvent; import io.github.mat3e.ddd.event.DomainEventPublisher; -import io.github.mat3e.fairytales.model.InMemoryThreePigsRepository; -import io.github.mat3e.fairytales.model.event.HouseEvent; +import io.github.mat3e.fairytales.pigs3.model.InMemoryThreePigsRepository; +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent; import java.util.HashSet; import java.util.Set; diff --git a/app/src/test/java/io/github/mat3e/fairytales/model/InMemoryThreePigsRepository.java b/app/src/test/java/io/github/mat3e/fairytales/pigs3/model/InMemoryThreePigsRepository.java similarity index 84% rename from app/src/test/java/io/github/mat3e/fairytales/model/InMemoryThreePigsRepository.java rename to app/src/test/java/io/github/mat3e/fairytales/pigs3/model/InMemoryThreePigsRepository.java index d44ca71..fdb322a 100644 --- a/app/src/test/java/io/github/mat3e/fairytales/model/InMemoryThreePigsRepository.java +++ b/app/src/test/java/io/github/mat3e/fairytales/pigs3/model/InMemoryThreePigsRepository.java @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.event.DomainEventPublisher; -import io.github.mat3e.fairytales.app.HouseQueryRepository; -import io.github.mat3e.fairytales.app.HouseReadModel; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.app.HouseQueryRepository; +import io.github.mat3e.fairytales.pigs3.app.HouseReadModel; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; import org.jetbrains.annotations.NotNull; import java.util.HashMap; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/Material.java b/domain/src/main/java/io/github/mat3e/fairytales/model/vo/Material.java deleted file mode 100644 index 07b3f98..0000000 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/Material.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.github.mat3e.fairytales.model.vo; - -public enum Material { - STRAW, WOOD, BRICKS -} diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/BigBadWolfService.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/BigBadWolfService.java similarity index 90% rename from domain/src/main/java/io/github/mat3e/fairytales/model/BigBadWolfService.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/BigBadWolfService.java index 9496a03..fa32aa5 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/BigBadWolfService.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/BigBadWolfService.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.event.DomainEventPublisher; -import io.github.mat3e.fairytales.model.event.WolfResignedFromAttacking; +import io.github.mat3e.fairytales.pigs3.model.event.WolfResignedFromAttacking; public class BigBadWolfService { private final DomainEventPublisher eventPublisher; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/House.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/House.java similarity index 88% rename from domain/src/main/java/io/github/mat3e/fairytales/model/House.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/House.java index 282f4ea..da63239 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/House.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/House.java @@ -1,12 +1,12 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.Aggregate; -import io.github.mat3e.fairytales.model.event.HouseAbandoned; -import io.github.mat3e.fairytales.model.event.HouseEvent; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.event.HouseAbandoned; +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import java.util.ArrayList; import java.util.Arrays; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/HouseFactory.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseFactory.java similarity index 57% rename from domain/src/main/java/io/github/mat3e/fairytales/model/HouseFactory.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseFactory.java index a077203..cb3c057 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/HouseFactory.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseFactory.java @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.HouseSnapshot; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import java.util.List; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/HouseRepository.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseRepository.java similarity index 61% rename from domain/src/main/java/io/github/mat3e/fairytales/model/HouseRepository.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseRepository.java index b8e02e5..191a01f 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/HouseRepository.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/HouseRepository.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.DomainRepository; -import io.github.mat3e.fairytales.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; /** * Needs to publish house events. diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/Policies.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Policies.java similarity index 83% rename from domain/src/main/java/io/github/mat3e/fairytales/model/Policies.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Policies.java index 6483c63..1d3cc18 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/Policies.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Policies.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; -import io.github.mat3e.fairytales.model.vo.Material; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; sealed interface BuildingPolicy { static BuildingPolicy chooseFor(Pig pig) { diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/Specifications.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Specifications.java similarity index 81% rename from domain/src/main/java/io/github/mat3e/fairytales/model/Specifications.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Specifications.java index a03ba8c..561df4c 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/Specifications.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/Specifications.java @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.model; +package io.github.mat3e.fairytales.pigs3.model; import io.github.mat3e.ddd.specification.Specification; -import io.github.mat3e.fairytales.model.vo.Material; +import io.github.mat3e.fairytales.pigs3.model.vo.Material; -import static io.github.mat3e.fairytales.model.vo.Material.STRAW; -import static io.github.mat3e.fairytales.model.vo.Material.WOOD; +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.STRAW; +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.WOOD; @FunctionalInterface interface BlowingDownSpecification extends Specification { diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseAbandoned.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseAbandoned.java similarity index 75% rename from domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseAbandoned.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseAbandoned.java index ed8d293..eca4b87 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseAbandoned.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseAbandoned.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model.event; +package io.github.mat3e.fairytales.pigs3.model.event; -import io.github.mat3e.fairytales.model.vo.HouseId; -import io.github.mat3e.fairytales.model.vo.Pig; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.Pig; import java.time.Instant; import java.util.List; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseEvent.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseEvent.java similarity index 61% rename from domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseEvent.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseEvent.java index 984a449..7979c5f 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/event/HouseEvent.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/HouseEvent.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model.event; +package io.github.mat3e.fairytales.pigs3.model.event; import io.github.mat3e.ddd.event.DomainEvent; -import io.github.mat3e.fairytales.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; public sealed interface HouseEvent extends DomainEvent permits HouseAbandoned, WolfResignedFromAttacking { HouseId house(); diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/event/WolfResignedFromAttacking.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/WolfResignedFromAttacking.java similarity index 66% rename from domain/src/main/java/io/github/mat3e/fairytales/model/event/WolfResignedFromAttacking.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/WolfResignedFromAttacking.java index 60534a8..3bd6af2 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/event/WolfResignedFromAttacking.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/event/WolfResignedFromAttacking.java @@ -1,6 +1,6 @@ -package io.github.mat3e.fairytales.model.event; +package io.github.mat3e.fairytales.pigs3.model.event; -import io.github.mat3e.fairytales.model.vo.HouseId; +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId; import java.time.Instant; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseId.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseId.java similarity index 87% rename from domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseId.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseId.java index 141d66b..96e1b2b 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseId.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseId.java @@ -1,4 +1,4 @@ -package io.github.mat3e.fairytales.model.vo; +package io.github.mat3e.fairytales.pigs3.model.vo; public record HouseId(int value) { public static HouseId empty() { diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseSnapshot.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshot.java similarity index 87% rename from domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseSnapshot.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshot.java index 4225bc0..9b2ea2e 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/HouseSnapshot.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshot.java @@ -1,7 +1,7 @@ -package io.github.mat3e.fairytales.model.vo; +package io.github.mat3e.fairytales.pigs3.model.vo; import io.github.mat3e.ddd.event.SnapshotWithEvents; -import io.github.mat3e.fairytales.model.event.HouseEvent; +import io.github.mat3e.fairytales.pigs3.model.event.HouseEvent; import java.util.List; import java.util.Objects; diff --git a/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Material.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Material.java new file mode 100644 index 0000000..c41b8fa --- /dev/null +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Material.java @@ -0,0 +1,5 @@ +package io.github.mat3e.fairytales.pigs3.model.vo; + +public enum Material { + STRAW, WOOD, BRICKS +} diff --git a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/Pig.java b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Pig.java similarity index 90% rename from domain/src/main/java/io/github/mat3e/fairytales/model/vo/Pig.java rename to domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Pig.java index bcd2b4d..a4173fb 100644 --- a/domain/src/main/java/io/github/mat3e/fairytales/model/vo/Pig.java +++ b/domain/src/main/java/io/github/mat3e/fairytales/pigs3/model/vo/Pig.java @@ -1,4 +1,4 @@ -package io.github.mat3e.fairytales.model.vo; +package io.github.mat3e.fairytales.pigs3.model.vo; public enum Pig { NOT_LAZY, diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseHelpers.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseHelpers.groovy deleted file mode 100644 index 6db929d..0000000 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseHelpers.groovy +++ /dev/null @@ -1,14 +0,0 @@ -package io.github.mat3e.fairytales.model - -import groovy.transform.TypeChecked - -@TypeChecked -trait HouseHelpers { - static House houseFrom(io.github.mat3e.fairytales.model.vo.Material material) { - House.from new io.github.mat3e.fairytales.model.vo.HouseSnapshot(randomId(), material, [], []) - } - - static io.github.mat3e.fairytales.model.vo.HouseId randomId() { - io.github.mat3e.fairytales.model.vo.HouseId.of(new Random().nextInt(100) + 1) - } -} diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/BigBadWolfServiceSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BigBadWolfServiceSpec.groovy similarity index 73% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/BigBadWolfServiceSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BigBadWolfServiceSpec.groovy index 85a0c78..374b233 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/BigBadWolfServiceSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BigBadWolfServiceSpec.groovy @@ -1,15 +1,17 @@ -package io.github.mat3e.fairytales.model +package io.github.mat3e.fairytales.pigs3.model import io.github.mat3e.ddd.event.DomainEventPublisher +import io.github.mat3e.fairytales.pigs3.model.event.HouseAbandoned +import io.github.mat3e.fairytales.pigs3.model.event.WolfResignedFromAttacking import spock.lang.Specification import spock.lang.Subject import spock.lang.Unroll import java.time.Instant -import static io.github.mat3e.fairytales.model.vo.Material.* -import static io.github.mat3e.fairytales.model.vo.Pig.LAZY +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Pig.LAZY class BigBadWolfServiceSpec extends Specification implements HouseHelpers { def publisher = Mock(DomainEventPublisher) @@ -37,8 +39,8 @@ class BigBadWolfServiceSpec extends Specification implements HouseHelpers { size() == 1 it[0].occurredOn() isAfter before it[0].occurredOn() isBefore Instant.now() - it[0] instanceof io.github.mat3e.fairytales.model.event.HouseAbandoned - (it[0] as io.github.mat3e.fairytales.model.event.HouseAbandoned).refugees() == [LAZY] + it[0] instanceof HouseAbandoned + (it[0] as HouseAbandoned).refugees() == [LAZY] } } @@ -51,7 +53,7 @@ class BigBadWolfServiceSpec extends Specification implements HouseHelpers { wolf.blowDown houseFrom(BRICKS) then: - 1 * publisher.publish(_ as io.github.mat3e.fairytales.model.event.WolfResignedFromAttacking) + 1 * publisher.publish(_ as WolfResignedFromAttacking) } def 'should blow down house from BRICKS with an overridden specification'() { @@ -72,8 +74,8 @@ class BigBadWolfServiceSpec extends Specification implements HouseHelpers { size() == 1 it[0].occurredOn() isAfter before it[0].occurredOn() isBefore Instant.now() - it[0] instanceof io.github.mat3e.fairytales.model.event.HouseAbandoned - (it[0] as io.github.mat3e.fairytales.model.event.HouseAbandoned).refugees() == [LAZY] + it[0] instanceof HouseAbandoned + (it[0] as HouseAbandoned).refugees() == [LAZY] } } diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/BuildingPolicySpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BuildingPolicySpec.groovy similarity index 74% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/BuildingPolicySpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BuildingPolicySpec.groovy index 981d641..49f81f9 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/BuildingPolicySpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/BuildingPolicySpec.groovy @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.model +package io.github.mat3e.fairytales.pigs3.model import spock.lang.Specification import spock.lang.Unroll -import static io.github.mat3e.fairytales.model.vo.Material.* -import static io.github.mat3e.fairytales.model.vo.Pig.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Pig.* class BuildingPolicySpec extends Specification { @Unroll('#material for a #motivation pig') diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/ConstructionSpecificationSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/ConstructionSpecificationSpec.groovy similarity index 88% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/ConstructionSpecificationSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/ConstructionSpecificationSpec.groovy index 5283fd4..719cc3c 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/ConstructionSpecificationSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/ConstructionSpecificationSpec.groovy @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.model +package io.github.mat3e.fairytales.pigs3.model import spock.lang.Specification import spock.lang.Unroll -import static io.github.mat3e.fairytales.model.vo.Material.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.* class ConstructionSpecificationSpec extends Specification implements HouseHelpers { @Unroll('#inputMaterial') diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/DefaultBlowingDownSpecificationSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/DefaultBlowingDownSpecificationSpec.groovy similarity index 83% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/DefaultBlowingDownSpecificationSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/DefaultBlowingDownSpecificationSpec.groovy index 608d653..b3d5433 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/DefaultBlowingDownSpecificationSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/DefaultBlowingDownSpecificationSpec.groovy @@ -1,10 +1,10 @@ -package io.github.mat3e.fairytales.model +package io.github.mat3e.fairytales.pigs3.model import spock.lang.Specification import spock.lang.Subject import spock.lang.Unroll -import static io.github.mat3e.fairytales.model.vo.Material.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.* class DefaultBlowingDownSpecificationSpec extends Specification implements HouseHelpers { @Subject diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseFactorySpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseFactorySpec.groovy similarity index 80% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseFactorySpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseFactorySpec.groovy index 7b4fff6..1271b24 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseFactorySpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseFactorySpec.groovy @@ -1,11 +1,11 @@ -package io.github.mat3e.fairytales.model +package io.github.mat3e.fairytales.pigs3.model import spock.lang.Specification import spock.lang.Subject import spock.lang.Unroll -import static io.github.mat3e.fairytales.model.vo.Material.* -import static io.github.mat3e.fairytales.model.vo.Pig.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Pig.* class HouseFactorySpec extends Specification { @Subject diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseHelpers.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseHelpers.groovy new file mode 100644 index 0000000..da27844 --- /dev/null +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseHelpers.groovy @@ -0,0 +1,17 @@ +package io.github.mat3e.fairytales.pigs3.model + +import groovy.transform.TypeChecked +import io.github.mat3e.fairytales.pigs3.model.vo.HouseId +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot +import io.github.mat3e.fairytales.pigs3.model.vo.Material + +@TypeChecked +trait HouseHelpers { + static House houseFrom(Material material) { + House.from new HouseSnapshot(randomId(), material, [], []) + } + + static HouseId randomId() { + HouseId.of(new Random().nextInt(100) + 1) + } +} diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseSpec.groovy similarity index 75% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseSpec.groovy index 0b4511d..df31ec9 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/HouseSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/HouseSpec.groovy @@ -1,18 +1,19 @@ -package io.github.mat3e.fairytales.model - +package io.github.mat3e.fairytales.pigs3.model +import io.github.mat3e.fairytales.pigs3.model.vo.HouseSnapshot +import io.github.mat3e.fairytales.pigs3.model.vo.Pig import spock.lang.Specification import spock.lang.Unroll -import static io.github.mat3e.fairytales.model.vo.Material.BRICKS -import static io.github.mat3e.fairytales.model.vo.Pig.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Material.BRICKS +import static io.github.mat3e.fairytales.pigs3.model.vo.Pig.* class HouseSpec extends Specification implements HouseHelpers { def 'should restore House from snapshot'() { given: def material = BRICKS def pigs = [VERY_LAZY, LAZY] - def snapshot = new io.github.mat3e.fairytales.model.vo.HouseSnapshot(randomId(), material, pigs) + def snapshot = new HouseSnapshot(randomId(), material, pigs) when: def result = House.from snapshot @@ -28,7 +29,7 @@ class HouseSpec extends Specification implements HouseHelpers { def 'should NOT restore when more than 3 pigs'() { given: - def snapshot = new io.github.mat3e.fairytales.model.vo.HouseSnapshot(randomId(), BRICKS, [LAZY, LAZY, LAZY, LAZY]) + def snapshot = new HouseSnapshot(randomId(), BRICKS, [LAZY, LAZY, LAZY, LAZY]) when: House.from snapshot @@ -84,7 +85,7 @@ class HouseSpec extends Specification implements HouseHelpers { def 'should throw when handling hurricane and from BRICKS'() { given: - def house = House.from new io.github.mat3e.fairytales.model.vo.HouseSnapshot(randomId(), BRICKS, [NOT_LAZY]) + def house = House.from new HouseSnapshot(randomId(), BRICKS, [NOT_LAZY]) when: house.handleHurricane BlowingDownSpecification.defaultSpec() @@ -93,7 +94,7 @@ class HouseSpec extends Specification implements HouseHelpers { thrown House.IndestructibleHouseException } - private static House houseWith(List pigs) { - House.from new io.github.mat3e.fairytales.model.vo.HouseSnapshot(randomId(), BRICKS, pigs) + private static House houseWith(List pigs) { + House.from new HouseSnapshot(randomId(), BRICKS, pigs) } } diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseIdSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseIdSpec.groovy similarity index 82% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseIdSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseIdSpec.groovy index e427e62..4e6e499 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseIdSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseIdSpec.groovy @@ -1,4 +1,4 @@ -package io.github.mat3e.fairytales.model.vo +package io.github.mat3e.fairytales.pigs3.model.vo import spock.lang.Specification diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseSnapshotSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshotSpec.groovy similarity index 85% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseSnapshotSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshotSpec.groovy index 9d46c1d..0027a3e 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/HouseSnapshotSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/HouseSnapshotSpec.groovy @@ -1,4 +1,4 @@ -package io.github.mat3e.fairytales.model.vo +package io.github.mat3e.fairytales.pigs3.model.vo import spock.lang.Specification diff --git a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/PigSpec.groovy b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/PigSpec.groovy similarity index 82% rename from domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/PigSpec.groovy rename to domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/PigSpec.groovy index 8b3e25b..e89376b 100644 --- a/domain/src/test/groovy/io/github/mat3e/fairytales/model/vo/PigSpec.groovy +++ b/domain/src/test/groovy/io/github/mat3e/fairytales/pigs3/model/vo/PigSpec.groovy @@ -1,9 +1,9 @@ -package io.github.mat3e.fairytales.model.vo +package io.github.mat3e.fairytales.pigs3.model.vo import spock.lang.Specification import spock.lang.Unroll -import static Pig.* +import static io.github.mat3e.fairytales.pigs3.model.vo.Pig.* class PigSpec extends Specification { @Unroll('from #start to #end')