-
- All Implemented Interfaces:
-
com.airbnb.mvrx.mocking.DataClassSetDsl
public class MockBuilder<V extends MockableMavericksView, Args extends Parcelable> extends MavericksViewMocks<V, Args> implements DataClassSetDsl
-
-
Field Summary
Fields Modifier and Type Field Description private final <ERROR CLASS>mocksprivate final List<List<MavericksMock<V, out Args>>>mockGroups
-
Method Summary
Modifier and Type Method Description <ERROR CLASS>getMocks()A list of mocks to use when testing a view. List<List<MavericksMock<V, out Args>>>getMockGroups()final Unitargs(String name, Function1<Args, Args> builder)Provide an instance of arguments to use when initializing a view and creating initial view model state. -
Methods inherited from class com.airbnb.mvrx.mocking.MockBuilder
invoke, set, setEmpty, setFalse, setLoading, setNetworkFailure, setNull, setTrue, setZero, success, validate, with -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getMocks
<ERROR CLASS> getMocks()
A list of mocks to use when testing a view. Each mock represents a unique state to be tested.
At least one of mocks or mockGroups must be implemented.
-
getMockGroups
List<List<MavericksMock<V, out Args>>> getMockGroups()
-
args
final Unit args(String name, Function1<Args, Args> builder)
Provide an instance of arguments to use when initializing a view and creating initial view model state. It is only valid to call this if you defined default arguments in the top level mock method. For convenience, the receiver of the lambda is the default arguments.
- Parameters:
name- Describes what state these arguments put the view in.
-
-
-
-