Skip to content

maiatoday/Hello8Ball

Repository files navigation

Hello8Ball CircleCI

Android weekly 438

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.

How to run

API key

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 and run the app

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

How to test

Run the tests in Android studio or use the command line.

Unit tests

./gradlew test

Coverage

./gradlew testDebugUnitTestCoverageVerification

Instrumented tests

./gradlew connectedAndroidTest

Slides

Testing Kotlin co-routines Dependecy injection

About

Sampler app for Kotlin testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages