diff --git a/src/main/java/com/dnd/runus/application/running/RunningRecordService.java b/src/main/java/com/dnd/runus/application/running/RunningRecordService.java index bc01644f..b5c91268 100644 --- a/src/main/java/com/dnd/runus/application/running/RunningRecordService.java +++ b/src/main/java/com/dnd/runus/application/running/RunningRecordService.java @@ -9,7 +9,7 @@ import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementPercentageRepository; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRecord; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRepository; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.goalAchievement.GoalAchievement; import com.dnd.runus.domain.goalAchievement.GoalAchievementRepository; @@ -172,8 +172,8 @@ public RunningRecordAddResultResponse addRunningRecord(long memberId, RunningRec Member member = memberRepository.findById(memberId).orElseThrow(() -> new NotFoundException(Member.class, memberId)); - Coordinate emptyCoordinate = new Coordinate(0, 0, 0); - List route = List.of(emptyCoordinate, emptyCoordinate); + CoordinatePoint emptyCoordinate = new CoordinatePoint(0, 0, 0); + List route = List.of(emptyCoordinate, emptyCoordinate); RunningRecord record = runningRecordRepository.save(RunningRecord.builder() .member(member) diff --git a/src/main/java/com/dnd/runus/domain/common/Coordinate.java b/src/main/java/com/dnd/runus/domain/common/CoordinatePoint.java similarity index 54% rename from src/main/java/com/dnd/runus/domain/common/Coordinate.java rename to src/main/java/com/dnd/runus/domain/common/CoordinatePoint.java index 9c885121..957a6cb7 100644 --- a/src/main/java/com/dnd/runus/domain/common/Coordinate.java +++ b/src/main/java/com/dnd/runus/domain/common/CoordinatePoint.java @@ -5,8 +5,8 @@ * @param latitude 위도 * @param altitude 고도 */ -public record Coordinate(double longitude, double latitude, double altitude) { - public Coordinate(double longitude, double latitude) { +public record CoordinatePoint(double longitude, double latitude, double altitude) { + public CoordinatePoint(double longitude, double latitude) { this(longitude, latitude, Double.NaN); } } diff --git a/src/main/java/com/dnd/runus/domain/running/RunningRecord.java b/src/main/java/com/dnd/runus/domain/running/RunningRecord.java index 2c134d71..f5cf9fc0 100644 --- a/src/main/java/com/dnd/runus/domain/running/RunningRecord.java +++ b/src/main/java/com/dnd/runus/domain/running/RunningRecord.java @@ -1,6 +1,6 @@ package com.dnd.runus.domain.running; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.global.constant.RunningEmoji; @@ -20,7 +20,7 @@ public record RunningRecord( Pace averagePace, ZonedDateTime startAt, ZonedDateTime endAt, - List route, + List route, String startLocation, String endLocation, RunningEmoji emoji) {} diff --git a/src/main/java/com/dnd/runus/infrastructure/persistence/domain/GeometryMapper.java b/src/main/java/com/dnd/runus/infrastructure/persistence/domain/GeometryMapper.java index 60e1d0b0..a978d00e 100644 --- a/src/main/java/com/dnd/runus/infrastructure/persistence/domain/GeometryMapper.java +++ b/src/main/java/com/dnd/runus/infrastructure/persistence/domain/GeometryMapper.java @@ -1,6 +1,7 @@ package com.dnd.runus.infrastructure.persistence.domain; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; +import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.LineString; import org.locationtech.jts.geom.PrecisionModel; @@ -14,21 +15,20 @@ public final class GeometryMapper { GeometryMapper() {} - public static Coordinate toDomain(org.locationtech.jts.geom.Coordinate coordinate) { - return new Coordinate(coordinate.getX(), coordinate.getY(), coordinate.getZ()); + public static CoordinatePoint toDomain(Coordinate coordinate) { + return new CoordinatePoint(coordinate.getX(), coordinate.getY(), coordinate.getZ()); } - public static List toDomain(LineString lineString) { + public static List toDomain(LineString lineString) { return Stream.of(lineString.getCoordinates()) .map(GeometryMapper::toDomain) .toList(); } - public static LineString toLineString(List coordinates) { - org.locationtech.jts.geom.Coordinate[] geoCoordinates = coordinates.stream() - .map(coordinate -> new org.locationtech.jts.geom.Coordinate( - coordinate.longitude(), coordinate.latitude(), coordinate.altitude())) - .toArray(org.locationtech.jts.geom.Coordinate[]::new); + public static LineString toLineString(List coordinates) { + Coordinate[] geoCoordinates = coordinates.stream() + .map(coordinate -> new Coordinate(coordinate.longitude(), coordinate.latitude(), coordinate.altitude())) + .toArray(Coordinate[]::new); return GeometryFactoryHolder.INSTANCE.createLineString(geoCoordinates); } diff --git a/src/test/java/com/dnd/runus/application/challenge/ChallengeServiceTest.java b/src/test/java/com/dnd/runus/application/challenge/ChallengeServiceTest.java index 8dcb861b..506cb6b9 100644 --- a/src/test/java/com/dnd/runus/application/challenge/ChallengeServiceTest.java +++ b/src/test/java/com/dnd/runus/application/challenge/ChallengeServiceTest.java @@ -1,7 +1,7 @@ package com.dnd.runus.application.challenge; import com.dnd.runus.domain.challenge.*; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.running.RunningRecord; @@ -108,7 +108,7 @@ void getChallengesWithYesterdayRecords_checkGoalValue() { new Pace(7, 0), startDate, startDate.plusMinutes(21), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO), @@ -121,7 +121,7 @@ void getChallengesWithYesterdayRecords_checkGoalValue() { new Pace(7, 0), startDate.plusMinutes(5), startDate.plusMinutes(5).plusMinutes(28), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); diff --git a/src/test/java/com/dnd/runus/application/member/MemberWithdrawServiceTest.java b/src/test/java/com/dnd/runus/application/member/MemberWithdrawServiceTest.java index 29ea7cda..0b774d31 100644 --- a/src/test/java/com/dnd/runus/application/member/MemberWithdrawServiceTest.java +++ b/src/test/java/com/dnd/runus/application/member/MemberWithdrawServiceTest.java @@ -3,7 +3,7 @@ import com.dnd.runus.domain.badge.BadgeAchievementRepository; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementPercentageRepository; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRepository; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.goalAchievement.GoalAchievementRepository; import com.dnd.runus.domain.member.Member; @@ -113,7 +113,7 @@ void testDeleteAllDataAboutMember_WithRunningRecords_NoChallengeAchievement() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now().plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -149,7 +149,7 @@ void testDeleteAllDataAboutMember_WithRunningRecords_WithChallengeAchievement() new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now().plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); diff --git a/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java b/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java index 2a8e18fa..97ddc055 100644 --- a/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java +++ b/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java @@ -4,7 +4,7 @@ import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementPercentageRepository; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRepository; import com.dnd.runus.domain.challenge.*; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.goalAchievement.GoalAchievement; import com.dnd.runus.domain.goalAchievement.GoalAchievementRepository; @@ -103,7 +103,7 @@ void getRunningRecord() { new Pace(5, 30), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(0, 0, 0), new Coordinate(0, 0, 0)), + List.of(new CoordinatePoint(0, 0, 0), new CoordinatePoint(0, 0, 0)), "start location", "end location", RunningEmoji.VERY_GOOD); @@ -160,7 +160,7 @@ void getRunningRecord_challenge() { new Pace(5, 30), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(0, 0, 0), new Coordinate(0, 0, 0)), + List.of(new CoordinatePoint(0, 0, 0), new CoordinatePoint(0, 0, 0)), "start location", "end location", RunningEmoji.VERY_GOOD); @@ -517,7 +517,7 @@ private RunningRecord createRunningRecord(RunningRecordRequest request, Member m .averagePace(Pace.from( request.runningData().distanceMeter(), request.runningData().runningTime())) - .route(List.of(new Coordinate(0, 0, 0), new Coordinate(0, 0, 0))) + .route(List.of(new CoordinatePoint(0, 0, 0), new CoordinatePoint(0, 0, 0))) .build(); } } diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementPercentageRepositoryImplTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementPercentageRepositoryImplTest.java index ce7767eb..b9c60914 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementPercentageRepositoryImplTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementPercentageRepositoryImplTest.java @@ -7,7 +7,7 @@ import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRecord; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRepository; import com.dnd.runus.domain.challenge.achievement.PercentageValues; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.member.MemberRepository; @@ -69,7 +69,7 @@ void setUp() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO))); diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementRepositoryImplTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementRepositoryImplTest.java index e2e193bd..bb4d85ed 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementRepositoryImplTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/challenge/ChallengeAchievementRepositoryImplTest.java @@ -4,7 +4,7 @@ import com.dnd.runus.domain.challenge.ChallengeType; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievement; import com.dnd.runus.domain.challenge.achievement.ChallengeAchievementRepository; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.member.MemberRepository; @@ -63,7 +63,7 @@ void setUp() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/goalAchievement/GoalAchievementRepositoryImplTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/goalAchievement/GoalAchievementRepositoryImplTest.java index 5f66d95b..eff744ee 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/goalAchievement/GoalAchievementRepositoryImplTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/goalAchievement/GoalAchievementRepositoryImplTest.java @@ -1,7 +1,7 @@ package com.dnd.runus.infrastructure.persistence.domain.goalAchievement; import com.dnd.runus.domain.challenge.GoalMetricType; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.goalAchievement.GoalAchievement; import com.dnd.runus.domain.goalAchievement.GoalAchievementRepository; @@ -54,7 +54,7 @@ void setUp() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -128,7 +128,7 @@ void deleteAllByRunningRecordIdsSuccess() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -141,7 +141,7 @@ void deleteAllByRunningRecordIdsSuccess() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/running/RunningRecordRepositoryImplTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/running/RunningRecordRepositoryImplTest.java index ae0221c6..72400480 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/running/RunningRecordRepositoryImplTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/running/RunningRecordRepositoryImplTest.java @@ -1,6 +1,6 @@ package com.dnd.runus.infrastructure.persistence.domain.running; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.member.MemberRepository; @@ -57,7 +57,7 @@ void deleteByMemberId() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.BAD); @@ -91,7 +91,7 @@ void getYesterdayRunningRecord() { new Pace(5, 11), dayBeforeYesterday.plusHours(i * i).plusMinutes(1), dayBeforeYesterday.plusHours(i * i).plusMinutes(30), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); @@ -125,7 +125,7 @@ void hasYesterdayRunningRecord() { new Pace(5, 11), dayBeforeYesterday.plusHours(i * i).plusMinutes(1), dayBeforeYesterday.plusHours(i * i).plusMinutes(30), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); @@ -170,7 +170,7 @@ void getTotalDistanceWithRunningRecords() { new Pace(5, 11), todayMidnight, todayMidnight, - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); @@ -202,7 +202,7 @@ void getAllRunningRecordsByMemberId() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -257,7 +257,7 @@ void getWeeklyDistanceSummary_WithRunningRecords() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -313,7 +313,7 @@ void getWeeklyDurationSummary_WithRunningRecords() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now(), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -369,7 +369,7 @@ void getAvgDistance_WithRunningRecords() { new Pace(5, 11), startDate.minusDays(1), startDate.minusDays(1).plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -383,7 +383,7 @@ void getAvgDistance_WithRunningRecords() { new Pace(5, 11), startDate, startDate.plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -397,7 +397,7 @@ void getAvgDistance_WithRunningRecords() { new Pace(5, 11), nextOfDndDate.minusDays(1), nextOfDndDate.minusDays(1).plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -411,7 +411,7 @@ void getAvgDistance_WithRunningRecords() { new Pace(5, 11), nextOfDndDate, nextOfDndDate.plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -465,7 +465,7 @@ void getAvgDuration_WithRunningRecords() { new Pace(5, 11), startDate.minusDays(1), startDate.minusDays(1).plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -479,7 +479,7 @@ void getAvgDuration_WithRunningRecords() { new Pace(5, 11), startDate, startDate.plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -493,7 +493,7 @@ void getAvgDuration_WithRunningRecords() { new Pace(5, 11), nextOfDndDate.minusDays(1), nextOfDndDate.minusDays(1).plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -507,7 +507,7 @@ void getAvgDuration_WithRunningRecords() { new Pace(5, 11), nextOfDndDate, nextOfDndDate.plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/scale/ScaleRepositoryImplTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/scale/ScaleRepositoryImplTest.java index f4ca0da0..7addacaf 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/domain/scale/ScaleRepositoryImplTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/domain/scale/ScaleRepositoryImplTest.java @@ -1,6 +1,6 @@ package com.dnd.runus.infrastructure.persistence.domain.scale; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.member.MemberRepository; @@ -94,7 +94,7 @@ void findAchievableScaleIdsWithoutNoAchievementRecords() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now().plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); @@ -126,7 +126,7 @@ void findAchievableScaleIds() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now().plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO)); @@ -144,7 +144,7 @@ void findAchievableScaleIds() { new Pace(5, 11), ZonedDateTime.now(), ZonedDateTime.now().plusHours(1), - List.of(new Coordinate(1, 2, 3), new Coordinate(4, 5, 6)), + List.of(new CoordinatePoint(1, 2, 3), new CoordinatePoint(4, 5, 6)), "start location", "end location", RunningEmoji.SOSO); diff --git a/src/test/java/com/dnd/runus/infrastructure/persistence/jpa/running/entity/RunningRecordEntityTest.java b/src/test/java/com/dnd/runus/infrastructure/persistence/jpa/running/entity/RunningRecordEntityTest.java index 113805d9..eee1b8f1 100644 --- a/src/test/java/com/dnd/runus/infrastructure/persistence/jpa/running/entity/RunningRecordEntityTest.java +++ b/src/test/java/com/dnd/runus/infrastructure/persistence/jpa/running/entity/RunningRecordEntityTest.java @@ -1,6 +1,6 @@ package com.dnd.runus.infrastructure.persistence.jpa.running.entity; -import com.dnd.runus.domain.common.Coordinate; +import com.dnd.runus.domain.common.CoordinatePoint; import com.dnd.runus.domain.common.Pace; import com.dnd.runus.domain.member.Member; import com.dnd.runus.domain.running.RunningRecord; @@ -31,7 +31,7 @@ void setUp() { .averagePace(Pace.ofSeconds(100)) .startAt(ZonedDateTime.now()) .endAt(ZonedDateTime.now()) - .route(List.of(new Coordinate(128.0, 36.0), new Coordinate(128.0, 37.0))) + .route(List.of(new CoordinatePoint(128.0, 36.0), new CoordinatePoint(128.0, 37.0))) .startLocation("start location") .endLocation("end location") .emoji(RunningEmoji.VERY_GOOD)