RED: test gutter game
This commit is contained in:
parent
131c2d4c48
commit
1f31a68df5
2 changed files with 25 additions and 0 deletions
9
lib/bowling_game.dart
Normal file
9
lib/bowling_game.dart
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
class BowlingGame {
|
||||||
|
void roll(int pins) {
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
int score() {
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
}
|
||||||
16
test/bowling_game_test.dart
Normal file
16
test/bowling_game_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:tdd_katas/bowling_game.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
group('Bowling Game', () {
|
||||||
|
test('gutter game - all zeros', () {
|
||||||
|
final game = BowlingGame();
|
||||||
|
|
||||||
|
for (int i = 0; i < 20; i++) {
|
||||||
|
game.roll(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(game.score(), 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue