diff options
Diffstat (limited to 'app/src/test')
-rw-r--r-- | app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt new file mode 100644 index 00000000..02c879f2 --- /dev/null +++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt @@ -0,0 +1,22 @@ +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 + +class BuildUtilsTest { + + @Test + fun matchingVersions() { + assertNull(BuildUtils.match("unknown")) + assertEquals(BuildUtils.Data("1.0.0", ""), BuildUtils.match("1.0.0")) + assertEquals(BuildUtils.Data("1.0.1", "22-asdf"), BuildUtils.match("1.0.1-22-asdf")) + } + + @Test + fun androidTests() { + assertNotNull(BuildUtils.match(BuildConfig.VERSION_NAME)) + } +}
\ No newline at end of file |