From: Gustavo Martin Morcuende Date: Thu, 24 Nov 2016 23:51:30 +0000 (+0100) Subject: TripService refactored X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=485e7503539162ea5ca67f2754d758932f1e2622;p=JavaForFun TripService refactored --- diff --git a/TDD/src/main/java/org/craftedsw/tripservicekata/trip/TripService.java b/TDD/src/main/java/org/craftedsw/tripservicekata/trip/TripService.java index 8061d2f..5a19beb 100644 --- a/TDD/src/main/java/org/craftedsw/tripservicekata/trip/TripService.java +++ b/TDD/src/main/java/org/craftedsw/tripservicekata/trip/TripService.java @@ -16,7 +16,11 @@ public class TripService { return user.isFriendsWith(getLoggedInUser()) ? tripsBy(user) - : new ArrayList<>(); + : noTrips(); + } + + private ArrayList noTrips() { + return new ArrayList<>(); } protected List tripsBy(User user) {