| Android | iOS | JVM | JS | WasmJS | macOS | tvOS | watchOS |
|---|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
This library adds support for testing the lifecycle module to test-utils.
Installing
This library is available on Maven Central. You can import Kaluga Test Utils Lifecycle as follows:
repositories {
// ...
mavenCentral()
}
// ...
dependencies {
// ...
implementation("com.splendo.kaluga.lifecycle:test:$kalugaVersion")
}
Helpers
On Android this library exposes:
AppCompatActivity.getOrPutAndRemoveOnDestroyFromCache— caches an instance ofTper activity and removes it onON_DESTROY.AppCompatActivity.lifecycleManagerObserver()— convenience that returns a per-activityLifecycleManagerObserversubscribed to that activity’s lifecycle. Used by the*Builder()helpers inalerts/test-utils,hud/test-utils,keyboard/test-utils, anddate-time-picker/test-utils.