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); } }