From 1f31a68df5bc01d3612db83326b08a000bd57892 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Tue, 10 Feb 2026 11:19:34 +0700 Subject: [PATCH] RED: test gutter game --- lib/bowling_game.dart | 9 +++++++++ test/bowling_game_test.dart | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lib/bowling_game.dart create mode 100644 test/bowling_game_test.dart diff --git a/lib/bowling_game.dart b/lib/bowling_game.dart new file mode 100644 index 0000000..838360e --- /dev/null +++ b/lib/bowling_game.dart @@ -0,0 +1,9 @@ +class BowlingGame { + void roll(int pins) { + throw UnimplementedError(); + } + + int score() { + throw UnimplementedError(); + } +} \ No newline at end of file diff --git a/test/bowling_game_test.dart b/test/bowling_game_test.dart new file mode 100644 index 0000000..f80bb94 --- /dev/null +++ b/test/bowling_game_test.dart @@ -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); + }); + }); +}