Skip to content

Commit

Permalink
REFACTROR: NAV-131 - Remove accessors(fluent=true) in DTOs (does not …
Browse files Browse the repository at this point in the history
…work).
  • Loading branch information
clukas1 committed Aug 22, 2024
1 parent 99976df commit 10c58c6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/main/java/ch/naviqore/app/dto/RoutingInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

@RequiredArgsConstructor
@ToString
@Getter
@Accessors(fluent = true)
public class RoutingInfo {
final boolean supportsMaxNumTransfers;
final boolean supportsMaxTravelTime;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/ch/naviqore/app/dto/ScheduleInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

@RequiredArgsConstructor
@ToString
@Getter
public class ScheduleInfo {
@Accessors(fluent = true)
final boolean hasAccessibility;
@Accessors(fluent = true)
final boolean hasBikes;
@Accessors(fluent = true)
final boolean hasTravelModes;
final ScheduleValidity scheduleValidity;
}
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,13 @@ void testQueryConfigValues(boolean supportsMaxNumTransfers, boolean supportsMaxT

ch.naviqore.app.dto.RoutingInfo routingInfo = routingController.getRoutingInfo();

assertEquals(supportsAccessibility, routingInfo.supportsAccessibility());
assertEquals(supportsBikes, routingInfo.supportsBikes());
assertEquals(supportsTravelModes, routingInfo.supportsTravelModes());
assertEquals(supportsMaxNumTransfers, routingInfo.supportsMaxNumTransfers());
assertEquals(supportsMaxTravelTime, routingInfo.supportsMaxTravelTime());
assertEquals(supportsMaxWalkingDuration, routingInfo.supportsMaxWalkingDuration());
assertEquals(supportsMinTransferDuration, routingInfo.supportsMinTransferDuration());
assertEquals(supportsAccessibility, routingInfo.isSupportsAccessibility());
assertEquals(supportsBikes, routingInfo.isSupportsBikes());
assertEquals(supportsTravelModes, routingInfo.isSupportsTravelModes());
assertEquals(supportsMaxNumTransfers, routingInfo.isSupportsMaxNumTransfers());
assertEquals(supportsMaxTravelTime, routingInfo.isSupportsMaxTravelTime());
assertEquals(supportsMaxWalkingDuration, routingInfo.isSupportsMaxWalkingDuration());
assertEquals(supportsMinTransferDuration, routingInfo.isSupportsMinTransferDuration());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ void testQueryConfigValues(boolean supportsAccessibility, boolean supportsBikes,
ScheduleController scheduleController = new ScheduleController(dummyService);

ch.naviqore.app.dto.ScheduleInfo routerInfo = scheduleController.getScheduleInfo();
assertEquals(supportsAccessibility, routerInfo.hasAccessibility());
assertEquals(supportsBikes, routerInfo.hasBikes());
assertEquals(supportsTravelModes, routerInfo.hasTravelModes());
assertEquals(supportsAccessibility, routerInfo.isHasAccessibility());
assertEquals(supportsBikes, routerInfo.isHasBikes());
assertEquals(supportsTravelModes, routerInfo.isHasTravelModes());
assertEquals(expStartDate, routerInfo.getScheduleValidity().getStartDate());
assertEquals(expEndDate, routerInfo.getScheduleValidity().getEndDate());
}
Expand Down

0 comments on commit 10c58c6

Please sign in to comment.