Skip to content

Commit ece573f

Browse files
Reformat code
1 parent f4a7e48 commit ece573f

File tree

1 file changed

+34
-32
lines changed

1 file changed

+34
-32
lines changed

client/src/test/java/org/opentripplanner/IntegrationTest.java

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
44
import static org.junit.jupiter.api.Assertions.assertFalse;
5-
import static org.junit.jupiter.api.Assertions.assertNull;
65
import static org.junit.jupiter.api.Assertions.assertNotNull;
6+
import static org.junit.jupiter.api.Assertions.assertNull;
77
import static org.junit.jupiter.api.Assertions.assertTrue;
88
import static org.opentripplanner.StationParameters.OSLO_EAST;
99
import static org.opentripplanner.StationParameters.OSLO_LUFTHAVN_ID;
@@ -318,39 +318,41 @@ public void modes(Set<RequestMode> modes) throws IOException {
318318

319319
@Test
320320
public void pageCursor() throws IOException {
321-
var params = TripPlanParameters.builder()
322-
.withFrom(OSLO_WEST)
323-
.withTo(OSLO_EAST)
324-
.withModes(RequestMode.TRANSIT, RequestMode.WALK)
325-
.withTime(LocalDateTime.now());
326-
327-
var initialResult = client.plan(params.build());
328-
LOG.info("Initial page has {} results", initialResult.itineraries().size());
329-
assertFalse(initialResult.itineraries().isEmpty());
330-
331-
var nextResult = client.plan(params.withPageCursor(initialResult.nextPageCursor()).build());
332-
LOG.info("Next page has {} results", nextResult.itineraries().size());
333-
assertFalse(nextResult.itineraries().isEmpty());
334-
335-
var prevResult = client.plan(params.withPageCursor(initialResult.previousPageCursor()).build());
336-
LOG.info("Prev page has {} results", prevResult.itineraries().size());
337-
assertFalse(prevResult.itineraries().isEmpty());
321+
var params =
322+
TripPlanParameters.builder()
323+
.withFrom(OSLO_WEST)
324+
.withTo(OSLO_EAST)
325+
.withModes(RequestMode.TRANSIT, RequestMode.WALK)
326+
.withTime(LocalDateTime.now());
327+
328+
var initialResult = client.plan(params.build());
329+
LOG.info("Initial page has {} results", initialResult.itineraries().size());
330+
assertFalse(initialResult.itineraries().isEmpty());
331+
332+
var nextResult = client.plan(params.withPageCursor(initialResult.nextPageCursor()).build());
333+
LOG.info("Next page has {} results", nextResult.itineraries().size());
334+
assertFalse(nextResult.itineraries().isEmpty());
335+
336+
var prevResult = client.plan(params.withPageCursor(initialResult.previousPageCursor()).build());
337+
LOG.info("Prev page has {} results", prevResult.itineraries().size());
338+
assertFalse(prevResult.itineraries().isEmpty());
338339
}
339340

340-
@Test
341-
public void nullPageCursor() throws IOException {
342-
var params = TripPlanParameters.builder()
343-
.withFrom(OSLO_WEST)
344-
.withTo(new Coordinate(0, 0))
345-
.withModes(RequestMode.TRANSIT)
346-
.withTime(LocalDateTime.now());
347-
348-
var result = client.plan(params.build());
349-
LOG.info("Result {}", result);
350-
assertTrue(result.itineraries().isEmpty());
351-
assertNull(result.nextPageCursor());
352-
assertNull(result.previousPageCursor());
353-
}
341+
@Test
342+
public void nullPageCursor() throws IOException {
343+
var params =
344+
TripPlanParameters.builder()
345+
.withFrom(OSLO_WEST)
346+
.withTo(new Coordinate(0, 0))
347+
.withModes(RequestMode.TRANSIT)
348+
.withTime(LocalDateTime.now());
349+
350+
var result = client.plan(params.build());
351+
LOG.info("Result {}", result);
352+
assertTrue(result.itineraries().isEmpty());
353+
assertNull(result.nextPageCursor());
354+
assertNull(result.previousPageCursor());
355+
}
354356

355357
@Test
356358
public void rentalStations() throws IOException {

0 commit comments

Comments
 (0)