diff --git a/test/game/pinball_game_test.dart b/test/game/pinball_game_test.dart index ecc5dd90..f1d6bb32 100644 --- a/test/game/pinball_game_test.dart +++ b/test/game/pinball_game_test.dart @@ -12,7 +12,7 @@ void main() { group('PinballGame', () { TestWidgetsFlutterBinding.ensureInitialized(); final flameTester = FlameTester(PinballGameTest.create); - final debugModeFlameTester = FlameTester(DebugPinballGameX.initial); + final debugModeFlameTester = FlameTester(DebugPinballGameTest.create); // TODO(alestiago): test if [PinballGame] registers // [BallScorePointsCallback] once the following issue is resolved: diff --git a/test/helpers/extensions.dart b/test/helpers/extensions.dart index a976abd9..2a0a7e59 100644 --- a/test/helpers/extensions.dart +++ b/test/helpers/extensions.dart @@ -10,3 +10,13 @@ extension PinballGameTest on PinballGame { ), ); } + +/// [DebugPinballGame] extension to reduce boilerplate in tests. +extension DebugPinballGameTest on DebugPinballGame { + /// Create [PinballGame] with default [PinballTheme]. + static DebugPinballGame create() => DebugPinballGame( + theme: const PinballTheme( + characterTheme: DashTheme(), + ), + ); +}