Skip to content

Commit

Permalink
Add test cases on ProjectionsToken
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 16, 2024
1 parent e17795b commit f65b616
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@

class ProjectionsTokenTest {

@Test
void assertGetStopIndex() {
assertThat(new ProjectionsToken(10, Collections.emptyMap()).getStopIndex(), is(10));
}
@Test
void assertGetStopIndex() {
assertThat(new ProjectionsToken(10, Collections.emptyMap()).getStopIndex(), is(10));
}

@Test
void assertToStringWithoutRouteUnit() {
Map<RouteUnit, Collection<String>> projections = new HashMap<>(1, 1);
RouteUnit routeUnit = new RouteUnit(new RouteMapper("foo_ds", "foo_ds_0"), Collections.singleton(new RouteMapper("foo_tbl", "foo_tbl_1")));
assertThat(new ProjectionsToken(0, Collections.singletonMap(routeUnit, Collections.singleton("foo_col"))).toString(routeUnit), is(", foo_col"));
}
@Test
void assertToStringWithoutRouteUnit() {
Map<RouteUnit, Collection<String>> projections = new HashMap<>(1, 1);
RouteUnit routeUnit = new RouteUnit(new RouteMapper("foo_ds", "foo_ds_0"), Collections.singleton(new RouteMapper("foo_tbl", "foo_tbl_1")));
assertThat(new ProjectionsToken(0, Collections.singletonMap(routeUnit, Collections.singleton("foo_col"))).toString(routeUnit), is(", foo_col"));
}
}

0 comments on commit f65b616

Please sign in to comment.