From 485e7503539162ea5ca67f2754d758932f1e2622 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Fri, 25 Nov 2016 00:51:30 +0100 Subject: [PATCH] TripService refactored --- .../main/java/org/craftedsw/tripservicekata/trip/TripService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.1.4