ViewModelScenario provides API to start and drive a ViewModel's lifecycle state for testing.

Summary

Public functions

open Unit

Finishes the managed ViewModel and clear the ViewModelStore.

Cmn

Public properties

VM

The current ViewModel.

Cmn

Public functions

close

open fun close(): Unit

Finishes the managed ViewModel and clear the ViewModelStore.

Public properties

viewModel

val viewModel: VM

The current ViewModel. The instance might update if the ViewModelStore is cleared.