From 6ba2282cb089d76c725029a4682e3626019b5ea0 Mon Sep 17 00:00:00 2001 From: Gobukgol Date: Thu, 14 May 2020 20:46:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=94=EA=B5=AC=EC=82=AC=ED=95=AD=202=20?= =?UTF-8?q?=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 패키지 구조 변경 --- src/main/java/racing/RacingGameApplication.java | 2 +- src/main/java/racing/{dto => domain}/GameInformation.java | 2 +- src/main/java/racing/domain/PhaseResult.java | 2 ++ src/main/java/racing/domain/RacingGame.java | 2 +- src/main/java/racing/domain/{ => car}/Car.java | 2 +- src/main/java/racing/domain/{ => car}/CarResult.java | 2 +- src/main/java/racing/domain/{ => car}/ParticipateCars.java | 2 +- src/main/java/racing/view/OutputView.java | 2 +- src/test/java/racing/domain/GameResultTest.java | 1 + src/test/java/racing/domain/PhaseResultTest.java | 1 + src/test/java/racing/domain/RacingGameTest.java | 1 - src/test/java/racing/domain/{ => car}/CarTest.java | 2 +- .../java/racing/{dto => domain/car}/GameInformationTest.java | 3 ++- src/test/java/racing/domain/{ => car}/ParticipateCarsTest.java | 2 +- .../java/racing/domain/common/FixedNumberGenerator.java | 0 15 files changed, 15 insertions(+), 11 deletions(-) rename src/main/java/racing/{dto => domain}/GameInformation.java (97%) rename src/main/java/racing/domain/{ => car}/Car.java (95%) rename src/main/java/racing/domain/{ => car}/CarResult.java (96%) rename src/main/java/racing/domain/{ => car}/ParticipateCars.java (97%) rename src/test/java/racing/domain/{ => car}/CarTest.java (95%) rename src/test/java/racing/{dto => domain/car}/GameInformationTest.java (92%) rename src/test/java/racing/domain/{ => car}/ParticipateCarsTest.java (97%) rename src/{main => test}/java/racing/domain/common/FixedNumberGenerator.java (100%) diff --git a/src/main/java/racing/RacingGameApplication.java b/src/main/java/racing/RacingGameApplication.java index 45a9eb1..4fae193 100644 --- a/src/main/java/racing/RacingGameApplication.java +++ b/src/main/java/racing/RacingGameApplication.java @@ -1,9 +1,9 @@ package racing; +import racing.domain.GameInformation; import racing.domain.GameResult; import racing.domain.RacingGame; import racing.domain.common.RandomNumberGenerator; -import racing.dto.GameInformation; import racing.view.InputView; import racing.view.OutputView; diff --git a/src/main/java/racing/dto/GameInformation.java b/src/main/java/racing/domain/GameInformation.java similarity index 97% rename from src/main/java/racing/dto/GameInformation.java rename to src/main/java/racing/domain/GameInformation.java index e8d90ff..c173857 100644 --- a/src/main/java/racing/dto/GameInformation.java +++ b/src/main/java/racing/domain/GameInformation.java @@ -1,4 +1,4 @@ -package racing.dto; +package racing.domain; public class GameInformation { private String[] namesOfCars; diff --git a/src/main/java/racing/domain/PhaseResult.java b/src/main/java/racing/domain/PhaseResult.java index 7e3c064..340ff94 100644 --- a/src/main/java/racing/domain/PhaseResult.java +++ b/src/main/java/racing/domain/PhaseResult.java @@ -1,5 +1,7 @@ package racing.domain; +import racing.domain.car.CarResult; + import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/racing/domain/RacingGame.java b/src/main/java/racing/domain/RacingGame.java index 1f62fa9..65cc828 100644 --- a/src/main/java/racing/domain/RacingGame.java +++ b/src/main/java/racing/domain/RacingGame.java @@ -1,7 +1,7 @@ package racing.domain; +import racing.domain.car.ParticipateCars; import racing.domain.common.NumberGenerator; -import racing.dto.GameInformation; public class RacingGame { private final ParticipateCars participateCars; diff --git a/src/main/java/racing/domain/Car.java b/src/main/java/racing/domain/car/Car.java similarity index 95% rename from src/main/java/racing/domain/Car.java rename to src/main/java/racing/domain/car/Car.java index de0861f..00ac5d3 100644 --- a/src/main/java/racing/domain/Car.java +++ b/src/main/java/racing/domain/car/Car.java @@ -1,4 +1,4 @@ -package racing.domain; +package racing.domain.car; public class Car { private static final int MOVE_CONIDTION = 4; diff --git a/src/main/java/racing/domain/CarResult.java b/src/main/java/racing/domain/car/CarResult.java similarity index 96% rename from src/main/java/racing/domain/CarResult.java rename to src/main/java/racing/domain/car/CarResult.java index 426484c..1c388e0 100644 --- a/src/main/java/racing/domain/CarResult.java +++ b/src/main/java/racing/domain/car/CarResult.java @@ -1,4 +1,4 @@ -package racing.domain; +package racing.domain.car; public class CarResult implements Comparable { diff --git a/src/main/java/racing/domain/ParticipateCars.java b/src/main/java/racing/domain/car/ParticipateCars.java similarity index 97% rename from src/main/java/racing/domain/ParticipateCars.java rename to src/main/java/racing/domain/car/ParticipateCars.java index e33a8a0..e8ef559 100644 --- a/src/main/java/racing/domain/ParticipateCars.java +++ b/src/main/java/racing/domain/car/ParticipateCars.java @@ -1,4 +1,4 @@ -package racing.domain; +package racing.domain.car; import racing.domain.common.NumberGenerator; diff --git a/src/main/java/racing/view/OutputView.java b/src/main/java/racing/view/OutputView.java index ff2f588..a86f251 100644 --- a/src/main/java/racing/view/OutputView.java +++ b/src/main/java/racing/view/OutputView.java @@ -1,8 +1,8 @@ package racing.view; -import racing.domain.CarResult; import racing.domain.GameResult; import racing.domain.PhaseResult; +import racing.domain.car.CarResult; import java.util.List; import java.util.stream.Collectors; diff --git a/src/test/java/racing/domain/GameResultTest.java b/src/test/java/racing/domain/GameResultTest.java index 08936a4..c87966f 100644 --- a/src/test/java/racing/domain/GameResultTest.java +++ b/src/test/java/racing/domain/GameResultTest.java @@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import racing.domain.car.CarResult; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/test/java/racing/domain/PhaseResultTest.java b/src/test/java/racing/domain/PhaseResultTest.java index a7c02ce..af4d62d 100644 --- a/src/test/java/racing/domain/PhaseResultTest.java +++ b/src/test/java/racing/domain/PhaseResultTest.java @@ -2,6 +2,7 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import racing.domain.car.CarResult; import java.util.Arrays; import java.util.LinkedHashMap; diff --git a/src/test/java/racing/domain/RacingGameTest.java b/src/test/java/racing/domain/RacingGameTest.java index 5000400..2dcac16 100644 --- a/src/test/java/racing/domain/RacingGameTest.java +++ b/src/test/java/racing/domain/RacingGameTest.java @@ -3,7 +3,6 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import racing.domain.common.FixedNumberGenerator; -import racing.dto.GameInformation; import static org.assertj.core.api.Assertions.assertThat; diff --git a/src/test/java/racing/domain/CarTest.java b/src/test/java/racing/domain/car/CarTest.java similarity index 95% rename from src/test/java/racing/domain/CarTest.java rename to src/test/java/racing/domain/car/CarTest.java index c7058d5..1cf2f0d 100644 --- a/src/test/java/racing/domain/CarTest.java +++ b/src/test/java/racing/domain/car/CarTest.java @@ -1,4 +1,4 @@ -package racing.domain; +package racing.domain.car; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; diff --git a/src/test/java/racing/dto/GameInformationTest.java b/src/test/java/racing/domain/car/GameInformationTest.java similarity index 92% rename from src/test/java/racing/dto/GameInformationTest.java rename to src/test/java/racing/domain/car/GameInformationTest.java index c93086d..ae3f0eb 100644 --- a/src/test/java/racing/dto/GameInformationTest.java +++ b/src/test/java/racing/domain/car/GameInformationTest.java @@ -1,7 +1,8 @@ -package racing.dto; +package racing.domain.car; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import racing.domain.GameInformation; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/racing/domain/ParticipateCarsTest.java b/src/test/java/racing/domain/car/ParticipateCarsTest.java similarity index 97% rename from src/test/java/racing/domain/ParticipateCarsTest.java rename to src/test/java/racing/domain/car/ParticipateCarsTest.java index a160a68..aa8cf8e 100644 --- a/src/test/java/racing/domain/ParticipateCarsTest.java +++ b/src/test/java/racing/domain/car/ParticipateCarsTest.java @@ -1,4 +1,4 @@ -package racing.domain; +package racing.domain.car; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/main/java/racing/domain/common/FixedNumberGenerator.java b/src/test/java/racing/domain/common/FixedNumberGenerator.java similarity index 100% rename from src/main/java/racing/domain/common/FixedNumberGenerator.java rename to src/test/java/racing/domain/common/FixedNumberGenerator.java