-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum MockBehavior.InitialStateMocking extends Enum<MockBehavior.InitialStateMocking>
Describes how a custom mocked state is applied to initialize a new ViewModel.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FullInitial view model state is taken from MockStateHolder and used in ViewModel creation. Additionally, any changes to state during ViewModel initialization are forcibly overridden by the mocked state.
PartialInitial view model state is taken from MockStateHolder and used in ViewModel creation, but that mocked state may be overridden either in the MavericksViewModelFactory or constructor of the ViewModel.
ForceMockExistingViewModelGenerally uses the same behavior as None, however, if an 'existingViewModel' is accessed and no previous instance exists this will take the default mock state off of the Fragment for that ViewModel and initialize the ViewModel with that state.
This is useful when we want a mocked screen to be able to open non mocked screens (in a test), and would otherwise crash if a newly opened screen uses 'existingViewModel' and the viewmodel doesn't actually exist (because we came from a mocked screen that doesn't represent normal screen flow).
NoneNo mocked state is applied. The ViewModel initializes itself through normal means.
-
Method Summary
Modifier and Type Method Description final StringgetName()final IntegergetOrdinal()-
-
Method Detail
-
getOrdinal
final Integer getOrdinal()
-
-
-
-