test: removed beginContact group

pull/234/head
alestiago 3 years ago
parent d91bb9c6c4
commit c3d8471a04

@ -23,27 +23,24 @@ void main() {
);
});
group(
'beginContact',
() {
flameTester.test('emits onBallContacted when contacts with a ball',
(game) async {
final behavior = AlienBumperBallContactBehavior();
final bloc = MockAlienBumperCubit();
whenListen(
bloc,
const Stream<AlienBumperState>.empty(),
initialState: AlienBumperState.active,
);
final alienBumper = AlienBumper.test(bloc: bloc);
await alienBumper.add(behavior);
await game.ensureAdd(alienBumper);
behavior.beginContact(MockBall(), MockContact());
verify(alienBumper.bloc.onBallContacted).called(1);
});
flameTester.test(
'beginContact emits onBallContacted when contacts with a ball',
(game) async {
final behavior = AlienBumperBallContactBehavior();
final bloc = MockAlienBumperCubit();
whenListen(
bloc,
const Stream<AlienBumperState>.empty(),
initialState: AlienBumperState.active,
);
final alienBumper = AlienBumper.test(bloc: bloc);
await alienBumper.add(behavior);
await game.ensureAdd(alienBumper);
behavior.beginContact(MockBall(), MockContact());
verify(alienBumper.bloc.onBallContacted).called(1);
},
);
},

@ -23,27 +23,24 @@ void main() {
);
});
group(
'beginContact',
() {
flameTester.test('emits onBallContacted when contacts with a ball',
(game) async {
final behavior = DashNestBumperBallContactBehavior();
final bloc = MockDashNestBumperCubit();
whenListen(
bloc,
const Stream<DashNestBumperState>.empty(),
initialState: DashNestBumperState.active,
);
final alienBumper = DashNestBumper.test(bloc: bloc);
await alienBumper.add(behavior);
await game.ensureAdd(alienBumper);
behavior.beginContact(MockBall(), MockContact());
verify(alienBumper.bloc.onBallContacted).called(1);
});
flameTester.test(
'beginContact emits onBallContacted when contacts with a ball',
(game) async {
final behavior = DashNestBumperBallContactBehavior();
final bloc = MockDashNestBumperCubit();
whenListen(
bloc,
const Stream<DashNestBumperState>.empty(),
initialState: DashNestBumperState.active,
);
final alienBumper = DashNestBumper.test(bloc: bloc);
await alienBumper.add(behavior);
await game.ensureAdd(alienBumper);
behavior.beginContact(MockBall(), MockContact());
verify(alienBumper.bloc.onBallContacted).called(1);
},
);
},

@ -23,27 +23,24 @@ void main() {
);
});
group(
'beginContact',
() {
flameTester.test('emits onBallContacted when contacts with a ball',
(game) async {
final behavior = GoogleLetterBallContactBehavior();
final bloc = MockGoogleLetterCubit();
whenListen(
bloc,
const Stream<GoogleLetterState>.empty(),
initialState: GoogleLetterState.active,
);
final googleLetter = GoogleLetter.test(bloc: bloc);
await googleLetter.add(behavior);
await game.ensureAdd(googleLetter);
behavior.beginContact(MockBall(), MockContact());
verify(googleLetter.bloc.onBallContacted).called(1);
});
flameTester.test(
'beginContact emits onBallContacted when contacts with a ball',
(game) async {
final behavior = GoogleLetterBallContactBehavior();
final bloc = MockGoogleLetterCubit();
whenListen(
bloc,
const Stream<GoogleLetterState>.empty(),
initialState: GoogleLetterState.active,
);
final googleLetter = GoogleLetter.test(bloc: bloc);
await googleLetter.add(behavior);
await game.ensureAdd(googleLetter);
behavior.beginContact(MockBall(), MockContact());
verify(googleLetter.bloc.onBallContacted).called(1);
},
);
},

@ -23,27 +23,24 @@ void main() {
);
});
group(
'beginContact',
() {
flameTester.test('emits onBallContacted when contacts with a ball',
(game) async {
final behavior = SparkyBumperBallContactBehavior();
final bloc = MockSparkyBumperCubit();
whenListen(
bloc,
const Stream<SparkyBumperState>.empty(),
initialState: SparkyBumperState.active,
);
final sparkyBumper = SparkyBumper.test(bloc: bloc);
await sparkyBumper.add(behavior);
await game.ensureAdd(sparkyBumper);
behavior.beginContact(MockBall(), MockContact());
verify(sparkyBumper.bloc.onBallContacted).called(1);
});
flameTester.test(
'beginContact emits onBallContacted when contacts with a ball',
(game) async {
final behavior = SparkyBumperBallContactBehavior();
final bloc = MockSparkyBumperCubit();
whenListen(
bloc,
const Stream<SparkyBumperState>.empty(),
initialState: SparkyBumperState.active,
);
final sparkyBumper = SparkyBumper.test(bloc: bloc);
await sparkyBumper.add(behavior);
await game.ensureAdd(sparkyBumper);
behavior.beginContact(MockBall(), MockContact());
verify(sparkyBumper.bloc.onBallContacted).called(1);
},
);
},

Loading…
Cancel
Save