chore: used testGameWidget

pull/111/head
alestiago 4 years ago
parent fe33bb7875
commit f3fa0d06f4

@ -58,9 +58,9 @@ void main() {
gameBloc: () => gameBloc, gameBloc: () => gameBloc,
); );
tester.widgetTest( tester.testGameWidget(
'removes ball', 'removes ball',
(game, tester) async { verify: (game, tester) async {
await game.add(ball); await game.add(ball);
final controller = LaunchedBallController(ball); final controller = LaunchedBallController(ball);
await ball.add(controller); await ball.add(controller);
@ -73,9 +73,9 @@ void main() {
}, },
); );
tester.widgetTest( tester.testGameWidget(
'adds BallLost to GameBloc', 'adds BallLost to GameBloc',
(game, tester) async { verify: (game, tester) async {
final controller = LaunchedBallController(ball); final controller = LaunchedBallController(ball);
await ball.add(controller); await ball.add(controller);
await game.add(ball); await game.add(ball);
@ -87,9 +87,9 @@ void main() {
}, },
); );
tester.widgetTest( tester.testGameWidget(
'adds a new ball if the game is not over', 'adds a new ball if the game is not over',
(game, tester) async { verify: (game, tester) async {
final controller = LaunchedBallController(ball); final controller = LaunchedBallController(ball);
await ball.add(controller); await ball.add(controller);
await game.add(ball); await game.add(ball);
@ -104,9 +104,9 @@ void main() {
}, },
); );
tester.widgetTest( tester.testGameWidget(
'no ball is added on game over', 'no ball is added on game over',
(game, tester) async { verify: (game, tester) async {
whenListen( whenListen(
gameBloc, gameBloc,
const Stream<GameState>.empty(), const Stream<GameState>.empty(),

Loading…
Cancel
Save