RED: test gutter game

This commit is contained in:
fiatcode 2026-02-10 11:19:34 +07:00
parent 131c2d4c48
commit 1f31a68df5
2 changed files with 25 additions and 0 deletions

9
lib/bowling_game.dart Normal file
View file

@ -0,0 +1,9 @@
class BowlingGame {
void roll(int pins) {
throw UnimplementedError();
}
int score() {
throw UnimplementedError();
}
}

View 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);
});
});
}