diff --git a/backend/src/test/java/com/now/naaga/game/application/GameServiceTest.java b/backend/src/test/java/com/now/naaga/game/application/GameServiceTest.java index 5753da362..6c4324002 100644 --- a/backend/src/test/java/com/now/naaga/game/application/GameServiceTest.java +++ b/backend/src/test/java/com/now/naaga/game/application/GameServiceTest.java @@ -203,24 +203,17 @@ class GameServiceTest { .startPosition(잠실역_교보문고_좌표) .build(); - final GameResult gameResult1 = gameResultBuilder.init() - .resultType(SUCCESS) - .game(game1) - .build(); - - final GameResult gameResult2 = gameResultBuilder.init() - .resultType(FAIL) - .game(game2) - .build(); + final int expectedTotalDistance = (int) 잠실_루터회관_정문_좌표.calculateDistance(잠실역_교보문고_좌표); // when - final Statistic expected = gameService.findStatistic(new PlayerRequest(player.getId())); + final Statistic actual = gameService.findStatistic(new PlayerRequest(player.getId())); // then assertSoftly(softAssertions -> { - softAssertions.assertThat(expected.getSuccessGameCount()).isEqualTo(1); - softAssertions.assertThat(expected.getFailGameCount()).isEqualTo(1); - softAssertions.assertThat(expected.getGameCount()).isEqualTo(2); + softAssertions.assertThat(actual.getSuccessGameCount()).isEqualTo(1); + softAssertions.assertThat(actual.getFailGameCount()).isEqualTo(1); + softAssertions.assertThat(actual.getGameCount()).isEqualTo(2); + softAssertions.assertThat(actual.getTotalDistance()).isEqualTo(expectedTotalDistance); }); }