BlocTester<TBloc extends JuiceBloc<TState>, TState extends BlocState> constructor

BlocTester<TBloc extends JuiceBloc<TState>, TState extends BlocState>(
  1. TBloc bloc
)

Creates a BlocTester for the given bloc.

Automatically subscribes to the bloc's stream to track emissions.

Implementation

BlocTester(this.bloc) {
  _subscription = bloc.stream.listen(_emissions.add);
}