aboutsummaryrefslogtreecommitdiff
path: root/app/src/test
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-17 17:49:18 -0700
committerAllan Wang <me@allanwang.ca>2021-04-17 17:49:18 -0700
commitd96d1d06a7c1581b97c042f2a74e7cd5b1c2546e (patch)
tree60ad049189d448132d1b99ea041a8f80a83ffe22 /app/src/test
parentcb2adc75d8e105adfdf0d5646c1a9b6d39c292f8 (diff)
downloadfrost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.tar.gz
frost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.tar.bz2
frost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.zip
Update theme providers and readd koin modules
Diffstat (limited to 'app/src/test')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt15
-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.kt4
-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/prefs/PrefsTest.kt2
-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/StringEscapeUtilsTest.kt2
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt2
14 files changed, 32 insertions, 31 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 4064a5ff..6f4cb90a 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/debugger/OfflineWebsiteTest.kt
@@ -18,6 +18,12 @@ 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
@@ -27,12 +33,6 @@ 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.
@@ -247,7 +247,8 @@ class OfflineWebsiteTest {
assertEquals(5, zip.size(), "2 files expected")
zip.assertContentEquals(
- "index.html", content
+ "index.html",
+ content
.replace(css1Url.toString(), "assets/a0_1.css")
.replace(css2Url.toString(), "assets/a1_2.css")
.replace(js1Url.toString(), "assets/a2_1.js.txt")
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 544d904f..9472adfe 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 08957ea9..d37e55c1 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 433fdb2a..558cffa1 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 e3b449c0..a5955101 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,12 +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.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 64a9fe31..cb8dd5e1 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 17ce847c..7c12ba73 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/internal/Internal.kt
@@ -20,6 +20,7 @@ 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
@@ -27,7 +28,6 @@ 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 20cdd5ec..89289322 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/kotlin/FlyweightTest.kt
@@ -16,6 +16,11 @@
*/
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
@@ -23,11 +28,6 @@ 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/prefs/PrefsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/prefs/PrefsTest.kt
index 28c0c899..a51dc460 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/prefs/PrefsTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/prefs/PrefsTest.kt
@@ -16,9 +16,9 @@
*/
package com.pitchedapps.frost.prefs
-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/BuildUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
index 596693e7..a40372af 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 cb427faa..055d70ee 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
@@ -17,13 +17,6 @@
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
@@ -39,6 +32,13 @@ 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 7c277dc7..7ec01e6d 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 kotlin.test.assertEquals
import org.junit.Test
+import kotlin.test.assertEquals
/**
* Created by Allan Wang on 2017-08-10.
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 408dd214..f5ea56ae 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 kotlin.test.assertEquals
import org.junit.Test
+import kotlin.test.assertEquals
/**
* 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 ac6068ef..485d0a7a 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.