From 8a6c40841e5c9b2be4ed4fc496ccd07ad63c0db7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 29 May 2017 06:54:08 +0200 Subject: [PATCH] Fix formatting --- .../net/pterodactylus/sone/utils/PaginationTest.kt | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/test/kotlin/net/pterodactylus/sone/utils/PaginationTest.kt b/src/test/kotlin/net/pterodactylus/sone/utils/PaginationTest.kt index dce14fe..3ce20ce 100644 --- a/src/test/kotlin/net/pterodactylus/sone/utils/PaginationTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/utils/PaginationTest.kt @@ -27,7 +27,7 @@ class PaginationTest { @Test fun `new pagination is at page number 1`() { - assertThat(pagination.pageNumber, equalTo(1)) + assertThat(pagination.pageNumber, equalTo(1)) } @Test @@ -50,98 +50,98 @@ class PaginationTest { @Test fun `the page count is returned correctly`() { - assertThat(pagination.pageCount, equalTo(3)) + assertThat(pagination.pageCount, equalTo(3)) } @Test fun `page size is returned correctly`() { - assertThat(pagination.pageSize, equalTo(2)) + assertThat(pagination.pageSize, equalTo(2)) } @Test fun `a page size of less than 1 is set to 1`() { - pagination.pageSize = 0 + pagination.pageSize = 0 assertThat(pagination.pageSize, equalTo(1)) } @Test fun `changing page size sets new page correctly`() { pagination.page = 1 - pagination.pageSize = 1 + pagination.pageSize = 1 assertThat(pagination.page, equalTo(2)) } @Test fun `changing page size to very large returns to page 0`() { - pagination.page = 1 + pagination.page = 1 pagination.pageSize = 20 assertThat(pagination.page, equalTo(0)) } @Test fun `item count for current page is page size of first page`() { - assertThat(pagination.itemCount, equalTo(2)) + assertThat(pagination.itemCount, equalTo(2)) } @Test fun `item count for last page is 1`() { - pagination.page = 2 + pagination.page = 2 assertThat(pagination.itemCount, equalTo(1)) } @Test fun `items on first page are returned correctly`() { - assertThat(pagination.items, contains(1, 2)) + assertThat(pagination.items, contains(1, 2)) } @Test fun `items on last page are returned correctly`() { - pagination.page = 2 + pagination.page = 2 assertThat(pagination.items, contains(5)) } @Test fun `pagination is first on first page`() { - assertThat(pagination.isFirst, equalTo(true)) + assertThat(pagination.isFirst, equalTo(true)) } @Test fun `pagination is not first on second page`() { pagination.page = 1 - assertThat(pagination.isFirst, equalTo(false)) + assertThat(pagination.isFirst, equalTo(false)) } @Test fun `pagination is not first on last page`() { pagination.page = 2 - assertThat(pagination.isFirst, equalTo(false)) + assertThat(pagination.isFirst, equalTo(false)) } @Test fun `pagination is not last on first page`() { - assertThat(pagination.isLast, equalTo(false)) + assertThat(pagination.isLast, equalTo(false)) } @Test fun `pagination is not last on second page`() { pagination.page = 1 - assertThat(pagination.isLast, equalTo(false)) + assertThat(pagination.isLast, equalTo(false)) } @Test fun `pagination is last on last page`() { pagination.page = 2 - assertThat(pagination.isLast, equalTo(true)) + assertThat(pagination.isLast, equalTo(true)) } @Test fun `pagination is necessary for three pages`() { - assertThat(pagination.isNecessary, equalTo(true)) + assertThat(pagination.isNecessary, equalTo(true)) } @Test fun `pagination is necessary for two pages`() { - pagination.pageSize = 4 + pagination.pageSize = 4 assertThat(pagination.isNecessary, equalTo(true)) } @@ -154,7 +154,7 @@ class PaginationTest { @Test fun `previous page is returned correctly for second page`() { pagination.page = 1 - assertThat(pagination.previousPage, equalTo(0)) + assertThat(pagination.previousPage, equalTo(0)) } @Test @@ -165,23 +165,23 @@ class PaginationTest { @Test fun `next page is returned correctly for first page`() { - assertThat(pagination.nextPage, equalTo(1)) + assertThat(pagination.nextPage, equalTo(1)) } @Test fun `next page is returned correctly for second page`() { pagination.page = 1 - assertThat(pagination.nextPage, equalTo(2)) + assertThat(pagination.nextPage, equalTo(2)) } @Test fun `last page is returned correctly`() { - assertThat(pagination.lastPage, equalTo(2)) + assertThat(pagination.lastPage, equalTo(2)) } @Test fun `iterator returns items on the current page`() { - assertThat(pagination.iterator().asSequence().toList(), contains(1, 2)) + assertThat(pagination.iterator().asSequence().toList(), contains(1, 2)) } } -- 2.7.4