fix: coverage

pull/212/head
alestiago 3 years ago
parent 7dcde691d1
commit d6f4a2e719

@ -37,7 +37,7 @@ class SparkyComputerController
} }
/// {@template sparky_turbo_charge_sensor_ball_contact_callback} /// {@template sparky_turbo_charge_sensor_ball_contact_callback}
/// Turbo charges the [Ball] when it enters the [SparkyComputer]. /// Turbo charges the [Ball] when it enters the [SparkyComputer]
/// {@endtemplate} /// {@endtemplate}
@visibleForTesting @visibleForTesting
class SparkyTurboChargeSensorBallContactCallback class SparkyTurboChargeSensorBallContactCallback

@ -8,21 +8,14 @@ import 'package:pinball/game/game.dart';
import '../../helpers/helpers.dart'; import '../../helpers/helpers.dart';
void main() { void main() {
group('SparkyComputerController', () { group('ControlledSparkyComputer', () {
TestWidgetsFlutterBinding.ensureInitialized(); TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(EmptyPinballTestGame.new); final flameTester = FlameTester(EmptyPinballTestGame.new);
late ControlledSparkyComputer controlledSparkyComputer; flameTester.test('loads correctly', (game) async {
final sparkyComputer = ControlledSparkyComputer();
setUp(() { await game.ensureAdd(sparkyComputer);
controlledSparkyComputer = ControlledSparkyComputer(); expect(game.children, contains(sparkyComputer));
});
test('can be instantiated', () {
expect(
SparkyComputerController(controlledSparkyComputer),
isA<SparkyComputerController>(),
);
}); });
flameTester.testGameWidget( flameTester.testGameWidget(

Loading…
Cancel
Save