aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps/frost/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps/frost/parsers')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt4
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
index 61c69c40..ecebed04 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/parsers/MessageParserTest.kt
@@ -1,6 +1,8 @@
package com.pitchedapps.frost.parsers
+import com.pitchedapps.frost.facebook.FB_EPOCH_MATCHER
import com.pitchedapps.frost.facebook.formattedFbUrl
+import com.pitchedapps.frost.facebook.get
import org.junit.Test
import kotlin.test.assertEquals
@@ -15,7 +17,7 @@ class MessageParserTest {
@Test
fun parseEpoch() {
val input = "{\"time\":1507301642,\"short\":true,\"forceseconds\":false}"
- assertEquals(1507301642, FrostRegex.epoch.find(input)!!.groupValues[1].toLong())
+ assertEquals(1507301642, FB_EPOCH_MATCHER.find(input)[1]!!.toLong())
}
@Test
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt b/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
index be5ac624..53495ecb 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
@@ -18,5 +18,5 @@ fun <T : Any> T.getResource(path: String): String? {
fun <T : Any, P : Any> T.debug(path: String, parser: FrostParser<P>) {
val content = getResource("priv/$path.html") ?: return
- println(parser.debug(content))
+// println(parser.debug(content))
} \ No newline at end of file