|
|
@ -7,6 +7,7 @@ import 'package:pinball/how_to_play/how_to_play.dart';
|
|
|
|
import 'package:pinball/select_character/select_character.dart';
|
|
|
|
import 'package:pinball/select_character/select_character.dart';
|
|
|
|
import 'package:pinball/start_game/start_game.dart';
|
|
|
|
import 'package:pinball/start_game/start_game.dart';
|
|
|
|
import 'package:pinball_audio/pinball_audio.dart';
|
|
|
|
import 'package:pinball_audio/pinball_audio.dart';
|
|
|
|
|
|
|
|
import 'package:platform_helper/platform_helper.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../helpers/helpers.dart';
|
|
|
|
import '../../helpers/helpers.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -18,10 +19,16 @@ class _MockCharacterThemeCubit extends Mock implements CharacterThemeCubit {}
|
|
|
|
|
|
|
|
|
|
|
|
class _MockPinballAudioPlayer extends Mock implements PinballAudioPlayer {}
|
|
|
|
class _MockPinballAudioPlayer extends Mock implements PinballAudioPlayer {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _MockPlatformHelper extends Mock implements PlatformHelper {
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
bool get isMobile => false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
void main() {
|
|
|
|
late StartGameBloc startGameBloc;
|
|
|
|
late StartGameBloc startGameBloc;
|
|
|
|
late PinballAudioPlayer pinballAudioPlayer;
|
|
|
|
late PinballAudioPlayer pinballAudioPlayer;
|
|
|
|
late CharacterThemeCubit characterThemeCubit;
|
|
|
|
late CharacterThemeCubit characterThemeCubit;
|
|
|
|
|
|
|
|
late PlatformHelper platformHelper;
|
|
|
|
|
|
|
|
|
|
|
|
group('StartGameListener', () {
|
|
|
|
group('StartGameListener', () {
|
|
|
|
setUp(() async {
|
|
|
|
setUp(() async {
|
|
|
@ -30,6 +37,7 @@ void main() {
|
|
|
|
startGameBloc = _MockStartGameBloc();
|
|
|
|
startGameBloc = _MockStartGameBloc();
|
|
|
|
pinballAudioPlayer = _MockPinballAudioPlayer();
|
|
|
|
pinballAudioPlayer = _MockPinballAudioPlayer();
|
|
|
|
characterThemeCubit = _MockCharacterThemeCubit();
|
|
|
|
characterThemeCubit = _MockCharacterThemeCubit();
|
|
|
|
|
|
|
|
platformHelper = _MockPlatformHelper();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
group('on selectCharacter status', () {
|
|
|
|
group('on selectCharacter status', () {
|
|
|
@ -121,6 +129,7 @@ void main() {
|
|
|
|
child: SizedBox.shrink(),
|
|
|
|
child: SizedBox.shrink(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
|
|
|
|
platformHelper: platformHelper,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
@ -213,6 +222,7 @@ void main() {
|
|
|
|
child: SizedBox.shrink(),
|
|
|
|
child: SizedBox.shrink(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
|
|
|
|
platformHelper: platformHelper,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
|
|
|
|
|
|
|
@ -244,6 +254,7 @@ void main() {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
startGameBloc: startGameBloc,
|
|
|
|
pinballAudioPlayer: pinballAudioPlayer,
|
|
|
|
pinballAudioPlayer: pinballAudioPlayer,
|
|
|
|
|
|
|
|
platformHelper: platformHelper,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
|
|
|
|
|
|
|
|