diff options
Diffstat (limited to 'app/src/test/kotlin/com')
-rw-r--r-- | app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt new file mode 100644 index 00000000..4062cf98 --- /dev/null +++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTests.kt @@ -0,0 +1,27 @@ +package com.pitchedapps.frost.utils + +import com.pitchedapps.frost.facebook.FACEBOOK_COM +import org.junit.Test +import kotlin.test.assertFalse +import kotlin.test.assertTrue + +/** + * Created by Allan Wang on 2017-11-15. + */ +class UrlTests { + + val GOOGLE = "https://www.google.ca" + + @Test + fun independence() { + assertTrue(GOOGLE.isIndependent, "google") + assertTrue(FACEBOOK_COM.isIndependent, "facebook") + assertFalse("#!/photos/viewer/?photoset_token=pcb.1234".isIndependent, "photo") + } + + @Test + fun isFacebook() { + assertFalse(GOOGLE.isFacebookUrl, "google") + assertTrue(FACEBOOK_COM.isFacebookUrl, "facebook") + } +}
\ No newline at end of file |