Example usage for org.springframework.data.domain Page getSize

List of usage examples for org.springframework.data.domain Page getSize

Introduction

In this page you can find the example usage for org.springframework.data.domain Page getSize.

Prototype

int getSize();

Source Link

Document

Returns the size of the Slice .

Usage

From source file:org.springframework.data.neo4j.aspects.support.FinderTest.java

private void assertPage(Page<Person> page0, int pageNumber, int totalPages, final int totalElements,
        Person... people) {//from ww w . ja  v a  2  s  .c o  m
    assertEquals("content count", people.length, page0.getNumberOfElements());
    assertEquals("page number", pageNumber, page0.getNumber());
    assertEquals("page size", 2, page0.getSize());
    assertEquals("total elements", totalElements, page0.getTotalElements());
    assertEquals("page count", totalPages, page0.getTotalPages());
    assertEquals("next page", pageNumber < totalPages - 1, page0.hasNextPage());
    assertEquals("previous page", pageNumber > 0, page0.hasPreviousPage());
    assertEquals("page content", asList(people), page0.getContent());
}