Created
December 6, 2011 05:58
-
-
Save rhysforyou/1436946 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "Game.h" | |
| #import <SenTestingKit/SenTestingKit.h> | |
| @interface BowlingGameTest : SenTestCase | |
| { | |
| } | |
| @end | |
| @implementation BowlingGameTest | |
| - (void)testGutterGame { | |
| Game *game = [game init]; | |
| for (int i = 0; i < 20; i++) { | |
| [game rollWithPinCount:0]; | |
| } | |
| STAssertEquals([game score], 0, @"Gutter game should total 0"); | |
| } | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| @interface Game : NSObject | |
| - (void)rollWithPinCount:(int)pins; | |
| - (int)score; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "Game.h" | |
| @implementation Game | |
| - (void)rollWithPinCount:(int)pins { | |
| } | |
| - (int)score { | |
| return -1; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment