aboutsummaryrefslogtreecommitdiff
path: root/app/src/androidTest
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest')
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt15
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt5
3 files changed, 32 insertions, 6 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
index 76b2d677..39b9f513 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
@@ -31,7 +31,13 @@ class GenericDbTest : BaseDbTest() {
*/
@Test
fun save() {
- val tabs = listOf(FbItem.ACTIVITY_LOG, FbItem.BIRTHDAYS, FbItem.EVENTS, FbItem.MARKETPLACE, FbItem.ACTIVITY_LOG)
+ val tabs = listOf(
+ FbItem.ACTIVITY_LOG,
+ FbItem.BIRTHDAYS,
+ FbItem.EVENTS,
+ FbItem.MARKETPLACE,
+ FbItem.ACTIVITY_LOG
+ )
runBlocking {
dao.saveTabs(tabs)
assertEquals(tabs, dao.getTabs(), "Tab saving failed")
@@ -51,7 +57,12 @@ class GenericDbTest : BaseDbTest() {
@Test
fun ignoreErrors() {
runBlocking {
- dao._save(GenericEntity(GenericDao.TYPE_TABS, "${FbItem.ACTIVITY_LOG.name},unknown,${FbItem.EVENTS.name}"))
+ dao._save(
+ GenericEntity(
+ GenericDao.TYPE_TABS,
+ "${FbItem.ACTIVITY_LOG.name},unknown,${FbItem.EVENTS.name}"
+ )
+ )
assertEquals(
listOf(FbItem.ACTIVITY_LOG, FbItem.EVENTS),
dao.getTabs(),
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"
+ )
}
}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt
index 3cd7dbf2..a39aa6d2 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt
@@ -24,6 +24,9 @@ class FbCookieTest {
@Test
fun managerAcceptsCookie() {
- assertTrue(CookieManager.getInstance().acceptCookie(), "Cookie manager should accept cookie by default")
+ assertTrue(
+ CookieManager.getInstance().acceptCookie(),
+ "Cookie manager should accept cookie by default"
+ )
}
}