Skip to content

Commit aa91c35

Browse files
committed
Added test for charts page size
1 parent 6f1d616 commit aa91c35

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/seatsio/charts/ListChartsTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import seatsio.SeatsioClientTest;
55
import seatsio.events.Event;
66

7+
import java.util.List;
78
import java.util.stream.Stream;
89

910
import static org.assertj.core.api.Assertions.assertThat;
@@ -86,4 +87,17 @@ public void expand() {
8687
.containsExactly(event2.id, event1.id);
8788
}
8889

90+
@Test
91+
public void pageSize() {
92+
Chart chart1 = client.charts.create();
93+
Chart chart2 = client.charts.create();
94+
Chart chart3 = client.charts.create();
95+
96+
List<Chart> charts = client.charts.listFirstPage(new ChartListParams().withPageSize(2)).items;
97+
98+
assertThat(charts)
99+
.extracting(chart -> chart.key)
100+
.containsExactly(chart3.key, chart2.key);
101+
}
102+
89103
}

0 commit comments

Comments
 (0)