From 4533dbeacc6ef77086cb14658c6ec2effe95b5f4 Mon Sep 17 00:00:00 2001 From: DHkimgit Date: Mon, 16 Dec 2024 20:30:11 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8C=80=EC=84=B1=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=ED=91=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koin/domain/bus/model/express/ExpressBusSchedule.java | 4 ++-- .../domain/bus/service/route/ExpressBusRouteStrategy.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/in/koreatech/koin/domain/bus/model/express/ExpressBusSchedule.java b/src/main/java/in/koreatech/koin/domain/bus/model/express/ExpressBusSchedule.java index dd796bce9..74f5ce09f 100644 --- a/src/main/java/in/koreatech/koin/domain/bus/model/express/ExpressBusSchedule.java +++ b/src/main/java/in/koreatech/koin/domain/bus/model/express/ExpressBusSchedule.java @@ -47,11 +47,11 @@ public final class ExpressBusSchedule { LocalTime.of(22, 5) ); - public static List getExpressBusScheduleToKoreaTech() { + public static List TerminalToKoreaTech() { return KOREA_TECH_SCHEDULE; } - public static List getExpressBusScheduleToTerminal() { + public static List KoreaTechToTerminal() { return TERMINAL_SCHEDULE; } } diff --git a/src/main/java/in/koreatech/koin/domain/bus/service/route/ExpressBusRouteStrategy.java b/src/main/java/in/koreatech/koin/domain/bus/service/route/ExpressBusRouteStrategy.java index 8e66519fe..9ca58b43f 100644 --- a/src/main/java/in/koreatech/koin/domain/bus/service/route/ExpressBusRouteStrategy.java +++ b/src/main/java/in/koreatech/koin/domain/bus/service/route/ExpressBusRouteStrategy.java @@ -21,7 +21,7 @@ public class ExpressBusRouteStrategy implements BusRouteStrategy { @Override public List findSchedule(BusRouteCommand command) { - if(validCourse(command.depart(), command.arrive())) return Collections.emptyList(); + if(validRoute(command.depart(), command.arrive())) return Collections.emptyList(); BusDirection direction = getRouteDirection(command.depart(), command.arrive()); return getStaticExpressBusScheduleTimeList(direction).stream() @@ -36,8 +36,8 @@ public boolean support(BusRouteType type) { private List getStaticExpressBusScheduleTimeList(BusDirection direction) { return switch (direction) { - case NORTH -> ExpressBusSchedule.getExpressBusScheduleToKoreaTech(); - case SOUTH -> ExpressBusSchedule.getExpressBusScheduleToTerminal(); + case NORTH -> ExpressBusSchedule.KoreaTechToTerminal(); + case SOUTH -> ExpressBusSchedule.TerminalToKoreaTech(); }; } @@ -46,7 +46,7 @@ private BusDirection getRouteDirection(BusStation depart, BusStation arrive) { ? BusDirection.NORTH : BusDirection.SOUTH; } - private boolean validCourse(BusStation depart, BusStation arrive) { + private boolean validRoute(BusStation depart, BusStation arrive) { return (depart == BusStation.STATION || arrive == BusStation.STATION); } }