ConnectorTester<St, Model> class Null safety

Helps testing the StoreConnectors methods, such as onInit, onDispose and onWillChange.

For more info, see: https://pub.dartlang.org/packages/async_redux

Example: Suppose you have a StoreConnector which dispatches SomeAction on its onInit. How could you test that?

class MyConnector extends StatelessWidget {
  Widget build(BuildContext context) => StoreConnector<AppState, Vm>(
        vm: () => _Factory(),
        onInit: _onInit,
        builder: (context, vm) { ... }
  }

  void _onInit(Store<AppState> store) => store.dispatch(SomeAction());
}

var storeTester = StoreTester(...);
ConnectorTester(tester, MyConnector()).runOnInit();
var info = await tester.waitUntil(SomeAction);

Constructors

ConnectorTester(StoreTester<St> tester, StatelessWidget widgetConnector)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
storeConnector StoreConnector<St, Model>
read-only
tester StoreTester<St>
final
widgetConnector StatelessWidget
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
runOnDispose() → void
runOnInit() → void
runOnWillChange(Model previousVm, Model newVm) → void
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited