A Magic 8 Ball app to use a sampler to explore Kotlin coroutine testing in an Android setting. The app works as a magic 8 ball. It can also generate passwords, find a synonym for a word and check if a number is prime or not. There are matching slides here (or here) for a presentation at Kotlin Everywhere 2019 in Johannesburg.
The app uses the kotlinx-coroutine-test library and references this code-lab.
This app uses an WordsAPI api key for the synonym lookup. Copy app/secrets.gradle.template
to app/secrets.gradle
and fill in your api key.
Import the build.gradle in the root folder into Android Studio latest canary. Run the app.
Or
./gradlew assembleDebug
and find the apk in app/build/outputs/apk/debug
Run the tests in Android studio or use the command line.
./gradlew test
./gradlew testDebugUnitTestCoverageVerification
./gradlew connectedAndroidTest