You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pinball/test/helpers/extensions.dart

23 lines
741 B

import 'package:pinball/game/game.dart';
import 'package:pinball_theme/pinball_theme.dart';
/// [PinballGame] extension to reduce boilerplate in tests.
extension PinballGameTest on PinballGame {
/// Create [PinballGame] with default [PinballTheme].
static PinballGame create() => PinballGame(
theme: const PinballTheme(
characterTheme: DashTheme(),
),
)..images.prefix = '';
}
/// [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(),
),
);
}