File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
main/java/travelator/recommendations
test/java/travelator/recommendations Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import travelator.domain.Location
7
7
8
8
class Recommendations (
9
9
private val featuredDestinations : FeaturedDestinations ,
10
- private val distanceCalculator : DistanceCalculator
11
- ) {
12
- private val destinationFinder: // <1>
10
+ private val distanceCalculator : DistanceCalculator ,
11
+ private val destinationFinder :
13
12
(Location ) -> List <FeaturedDestination > =
14
13
featuredDestinations : :findCloseTo
14
+ ) {
15
15
16
16
fun recommendationsFor (
17
17
journey : Set <Location >
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ public class RecommendationsTests {
24
24
mock (FeaturedDestinations .class );
25
25
private final Recommendations recommendations = new Recommendations (
26
26
featuredDestinations ,
27
- distanceCalculator
27
+ distanceCalculator ,
28
+ featuredDestinations ::findCloseTo
28
29
);
29
30
private final Location paris = location ("Paris" );
30
31
private final FeaturedDestination louvre = featured ("Louvre" , "Rue de Rivoli" );
You can’t perform that action at this time.
0 commit comments