mirror of https://github.com/flutter/pinball.git
parent
0e75c4a3b8
commit
7ed1a6e33d
@ -0,0 +1,24 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pinball/game/game.dart';
|
||||
|
||||
void main() {
|
||||
group('GameEvent', () {
|
||||
group('BallLost', () {
|
||||
test('BallLost can be instantiated', () {
|
||||
expect(const BallLost(), isNotNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('Scored', () {
|
||||
test('Scored can be instantiated', () {
|
||||
expect(const Scored(points: 1), isNotNull);
|
||||
});
|
||||
|
||||
test(
|
||||
'throws AssertionError '
|
||||
'when score is smaller than 1', () {
|
||||
expect(() => Scored(points: 0), throwsAssertionError);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Reference in new issue