-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaginationHelperTest.java
More file actions
34 lines (28 loc) · 866 Bytes
/
Copy pathPaginationHelperTest.java
File metadata and controls
34 lines (28 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import org.junit.Ignore;
import org.junit.Test;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
public class PaginationHelperTest {
PaginationHelper<Character> helper = new PaginationHelper(Arrays.asList(), 4);
@Test
public void itemCount() {
assertEquals(0, helper.itemCount());
}
@Test
public void pageCount() {
assertEquals(0, helper.pageCount());
}
@Test
public void pageItemCount() {
assertEquals(-1, helper.pageItemCount(0));
assertEquals(-1, helper.pageItemCount(1));
assertEquals(-1, helper.pageItemCount(2));
}
@Test
public void pageIndex() {
assertEquals(-1, helper.pageIndex(5));
assertEquals(-1, helper.pageIndex(2));
assertEquals(-1, helper.pageIndex(20));
assertEquals(-1, helper.pageIndex(-10));
}
}