use of com.yahoo.elide.annotation.Paginate in project elide by yahoo.
the class PaginationImplTest method testClassLevelOverride.
@Test
public void testClassLevelOverride() {
@Paginate(maxLimit = 100000, defaultLimit = 10)
class PaginationOverrideTest {
}
MultivaluedMap<String, String> queryParams = new MultivaluedStringMap();
PaginationImpl pageData = PaginationImpl.parseQueryParams(ClassType.of(PaginationOverrideTest.class), queryParams, new ElideSettingsBuilder(null).withEntityDictionary(EntityDictionary.builder().build()).withDefaultPageSize(1).withDefaultMaxPageSize(1).build());
assertEquals(0, pageData.getOffset());
assertEquals(10, pageData.getLimit());
}
Aggregations