helper

Solutions on MaxInterview for helper by the best coders in the world

showing results for - "helper"
Andrea
06 Jun 2017
1<h1>PAGINATION HELPER</h1>
2PaginationHelper  used for implementation of pagination UI components and a set of Unit tests to properly test it.
3
4TECHNOLOGIES
5-Java 8
6-Junit5 (junit.jupiter v5.8.0)
7
8COMPONENTS OF PAGINATION HELPER
9!! Zero Base Indexes!!
10
11-Pagination Constructor :
12 PaginationHelper(char[], int) :  Takes 2 parameters
13    -items:char[]
14    -itemsPerPage:int
15
16-itemCount():int : returns counts of entire items
17-pageCount():int : returns how many pages can be returns according to itemCount
18-pageIndex(int):int : determines what page an item is on.
19-pageItemCount(int):int : returns the number of items on the current page.
20
21HOW TO TEST
22-In the project under the test folder>java> create a test class.java
23-Call you object from PaginationHelper in the test class
24-Use @Test annotations from junit.jupiter
25-Assertion use static imports from jupiter junit
26    import static org.junit.jupiter.api.Assertions.assertEquals;
27    import static org.junit.jupiter.api.Assertions.assertNotEquals;
28
29
30
31
32
33
similar questions
queries leading to this page
helper