Package 

Class MockBuilder

    • 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 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.
      • 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.

      • 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.