diff options
author | Allan Wang <me@allanwang.ca> | 2020-03-01 23:00:09 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-03-01 23:00:09 -0800 |
commit | e19c87ae367154bd5bbf59f080eee4976e64e2da (patch) | |
tree | 52f30b2d97dee998aabe46feffc1f4999275ec42 /app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt | |
parent | 10d6cfdecb790e235e09641b18b4a10a645f87a0 (diff) | |
download | frost-e19c87ae367154bd5bbf59f080eee4976e64e2da.tar.gz frost-e19c87ae367154bd5bbf59f080eee4976e64e2da.tar.bz2 frost-e19c87ae367154bd5bbf59f080eee4976e64e2da.zip |
Format code
Diffstat (limited to 'app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt')
-rw-r--r-- | app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt index ed49439c..60b6ee05 100644 --- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt @@ -51,7 +51,11 @@ class NotificationDbTest : BaseDbTest() { db.cookieDao().save(cookie) dao.saveNotifications(NOTIF_CHANNEL_GENERAL, notifs) val dbNotifs = dao.selectNotifications(cookie.id, NOTIF_CHANNEL_GENERAL) - assertEquals(notifs.sortedByDescending { it.timestamp }, dbNotifs, "Incorrect notification list received") + assertEquals( + notifs.sortedByDescending { it.timestamp }, + dbNotifs, + "Incorrect notification list received" + ) } } @@ -126,10 +130,18 @@ class NotificationDbTest : BaseDbTest() { // Unique unsorted ids val notifs = listOf(0L, 4L, 2L, 6L, 99L, 3L).map { notifContent(it, cookie) } runBlocking { - assertEquals(-1L, dao.latestEpoch(cookie.id, NOTIF_CHANNEL_GENERAL), "Default epoch failed") + assertEquals( + -1L, + dao.latestEpoch(cookie.id, NOTIF_CHANNEL_GENERAL), + "Default epoch failed" + ) db.cookieDao().save(cookie) dao.saveNotifications(NOTIF_CHANNEL_GENERAL, notifs) - assertEquals(99L, dao.latestEpoch(cookie.id, NOTIF_CHANNEL_GENERAL), "Latest epoch failed") + assertEquals( + 99L, + dao.latestEpoch(cookie.id, NOTIF_CHANNEL_GENERAL), + "Latest epoch failed" + ) } } |