import 'package:bloc_test/bloc_test.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pinball/start_game/bloc/start_game_bloc.dart'; void main() { group('StartGameBloc', () { blocTest( 'on PlayTapped changes status to selectCharacter', build: StartGameBloc.new, act: (bloc) => bloc.add(const PlayTapped()), expect: () => [ const StartGameState( status: StartGameStatus.selectCharacter, ) ], ); blocTest( 'on ReplayTapped changes status to selectCharacter', build: StartGameBloc.new, act: (bloc) => bloc.add(const ReplayTapped()), expect: () => [ const StartGameState( status: StartGameStatus.selectCharacter, ) ], ); blocTest( 'on CharacterSelected changes status to howToPlay', build: StartGameBloc.new, act: (bloc) => bloc.add(const CharacterSelected()), expect: () => [ const StartGameState( status: StartGameStatus.howToPlay, ) ], ); blocTest( 'on HowToPlayFinished changes status to play', build: StartGameBloc.new, act: (bloc) => bloc.add(const HowToPlayFinished()), expect: () => [ const StartGameState( status: StartGameStatus.play, ) ], ); }); }