aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-12-30 11:03:25 -0800
committerAllan Wang <me@allanwang.ca>2019-12-30 11:03:25 -0800
commitdd3320efb1de998b8022d341036c79121618bb31 (patch)
tree8fb7f7ffbc54dffeb274a500eda7534958d7732f /app/src/test/kotlin/com/pitchedapps
parentaf1a3954a7769ad7cc0cdcd6052cc9f3193aac1c (diff)
downloadfrost-dd3320efb1de998b8022d341036c79121618bb31.tar.gz
frost-dd3320efb1de998b8022d341036c79121618bb31.tar.bz2
frost-dd3320efb1de998b8022d341036c79121618bb31.zip
Apply spotless and update changelog
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt14
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/parsers/FbParseTest.kt5
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/requests/FbFullImageTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt10
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt14
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/JsoupCleanerTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt2
14 files changed, 31 insertions, 32 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
index 1d886292..20c0878f 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
@@ -18,12 +18,6 @@ package com.pitchedapps.frost.debugger
import com.pitchedapps.frost.facebook.FB_URL_BASE
import com.pitchedapps.frost.internal.COOKIE
-import kotlinx.coroutines.runBlocking
-import okhttp3.mockwebserver.Dispatcher
-import okhttp3.mockwebserver.MockResponse
-import okhttp3.mockwebserver.MockWebServer
-import okhttp3.mockwebserver.RecordedRequest
-import org.junit.Assume.assumeTrue
import java.io.File
import java.util.zip.ZipFile
import kotlin.test.AfterTest
@@ -33,6 +27,12 @@ import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
+import kotlinx.coroutines.runBlocking
+import okhttp3.mockwebserver.Dispatcher
+import okhttp3.mockwebserver.MockResponse
+import okhttp3.mockwebserver.MockWebServer
+import okhttp3.mockwebserver.RecordedRequest
+import org.junit.Assume.assumeTrue
/**
* Created by Allan Wang on 05/01/18.
@@ -228,7 +228,7 @@ class OfflineWebsiteTest {
console.log('world');
""".trimIndent()
- server.dispatcher=object : Dispatcher() {
+ server.dispatcher = object : Dispatcher() {
override fun dispatch(request: RecordedRequest): MockResponse {
val path = request.path ?: return MockResponse().setBody(content)
return when {
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt
index 9472adfe..544d904f 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt
@@ -18,9 +18,9 @@ package com.pitchedapps.frost.facebook
import com.pitchedapps.frost.internal.authDependent
import com.pitchedapps.frost.internal.testJsoup
+import kotlin.test.assertNotNull
import org.junit.BeforeClass
import org.junit.Test
-import kotlin.test.assertNotNull
class FbDomTest {
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
index f872cfc7..fc96ef2e 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbRegexTest.kt
@@ -16,9 +16,9 @@
*/
package com.pitchedapps.frost.facebook
+import kotlin.test.assertEquals
import org.apache.commons.text.StringEscapeUtils
import org.junit.Test
-import kotlin.test.assertEquals
/**
* Created by Allan Wang on 24/12/17.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
index 4dc6504d..bdb74756 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -18,10 +18,10 @@ package com.pitchedapps.frost.facebook
import com.pitchedapps.frost.utils.isImageUrl
import com.pitchedapps.frost.utils.isIndirectImageUrl
-import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
+import org.junit.Test
/**
* Created by Allan Wang on 2017-07-07.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/parsers/FbParseTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/parsers/FbParseTest.kt
index 703c2074..22fe7ef3 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/parsers/FbParseTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/parsers/FbParseTest.kt
@@ -20,13 +20,12 @@ import com.pitchedapps.frost.internal.COOKIE
import com.pitchedapps.frost.internal.assertComponentsNotEmpty
import com.pitchedapps.frost.internal.assertDescending
import com.pitchedapps.frost.internal.authDependent
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
import kotlin.test.fail
+import org.junit.BeforeClass
+import org.junit.Test
/**
* Created by Allan Wang on 24/12/17.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/requests/FbFullImageTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/requests/FbFullImageTest.kt
index cb8dd5e1..64a9fe31 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/requests/FbFullImageTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/requests/FbFullImageTest.kt
@@ -18,10 +18,10 @@ package com.pitchedapps.frost.facebook.requests
import com.pitchedapps.frost.internal.COOKIE
import com.pitchedapps.frost.internal.authDependent
+import kotlin.test.assertNotNull
import kotlinx.coroutines.runBlocking
import org.junit.BeforeClass
import org.junit.Test
-import kotlin.test.assertNotNull
/**
* Created by Allan Wang on 12/04/18.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt b/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt
index d0d5c019..b83cb62e 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt
@@ -20,7 +20,6 @@ import com.pitchedapps.frost.facebook.FB_USER_MATCHER
import com.pitchedapps.frost.facebook.FbItem
import com.pitchedapps.frost.facebook.get
import com.pitchedapps.frost.utils.frostJsoup
-import org.junit.Assume
import java.io.File
import java.io.FileInputStream
import java.util.Properties
@@ -28,6 +27,7 @@ import kotlin.reflect.full.starProjectedType
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import kotlin.test.fail
+import org.junit.Assume
/**
* Created by Allan Wang on 21/12/17.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt
index d1d976b6..bcc86974 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt
@@ -16,11 +16,6 @@
*/
package com.pitchedapps.frost.kotlin
-import kotlinx.coroutines.CancellationException
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.runBlocking
-import org.junit.Rule
-import org.junit.rules.Timeout
import java.util.concurrent.atomic.AtomicInteger
import kotlin.test.BeforeTest
import kotlin.test.Test
@@ -28,6 +23,11 @@ import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
import kotlin.test.fail
+import kotlinx.coroutines.CancellationException
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.runBlocking
+import org.junit.Rule
+import org.junit.rules.Timeout
class FlyweightTest {
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
index e6b0beab..7b1fcfcf 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
@@ -17,10 +17,10 @@
package com.pitchedapps.frost.utils
import com.pitchedapps.frost.BuildConfig
-import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
+import org.junit.Test
class BuildUtilsTest {
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
index 5cde7323..7faf2b67 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
@@ -17,6 +17,13 @@
package com.pitchedapps.frost.utils
import com.pitchedapps.frost.kotlin.Flyweight
+import java.util.concurrent.Executors
+import kotlin.coroutines.EmptyCoroutineContext
+import kotlin.test.Ignore
+import kotlin.test.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertFalse
+import kotlin.test.assertTrue
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
@@ -32,13 +39,6 @@ import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
-import java.util.concurrent.Executors
-import kotlin.coroutines.EmptyCoroutineContext
-import kotlin.test.Ignore
-import kotlin.test.Test
-import kotlin.test.assertEquals
-import kotlin.test.assertFalse
-import kotlin.test.assertTrue
/**
* Collection of tests around coroutines
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/JsoupCleanerTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/JsoupCleanerTest.kt
index 72cca836..13dc7ac6 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/JsoupCleanerTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/JsoupCleanerTest.kt
@@ -16,8 +16,8 @@
*/
package com.pitchedapps.frost.utils
-import org.junit.Test
import kotlin.test.assertEquals
+import org.junit.Test
/**
* Created by Allan Wang on 2017-08-10.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt
index 3bac33ac..d592f2b6 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/PrefsTest.kt
@@ -16,9 +16,9 @@
*/
package com.pitchedapps.frost.utils
+import kotlin.test.assertEquals
import org.junit.Before
import org.junit.Test
-import kotlin.test.assertEquals
/**
* Created by Allan Wang on 2017-05-31.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt
index f5ea56ae..408dd214 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/StringEscapeUtilsTest.kt
@@ -16,8 +16,8 @@
*/
package com.pitchedapps.frost.utils
-import org.junit.Test
import kotlin.test.assertEquals
+import org.junit.Test
/**
* Created by Allan Wang on 11/03/18.
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt
index 44e8377a..85de8f89 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt
@@ -17,10 +17,10 @@
package com.pitchedapps.frost.utils
import com.pitchedapps.frost.facebook.FACEBOOK_COM
-import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
+import org.junit.Test
/**
* Created by Allan Wang on 2017-11-15.