diff --git a/Tennis/objc/Tennis/TennisGame.h b/Tennis/objc/Tennis/TennisGame.h index bca6994b..613d95b4 100644 --- a/Tennis/objc/Tennis/TennisGame.h +++ b/Tennis/objc/Tennis/TennisGame.h @@ -1,14 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import - @interface TennisGame : NSObject - (id)initWithPlayer1:(NSString *)player1 player2:(NSString *)player2; diff --git a/Tennis/objc/Tennis/TennisGame.m b/Tennis/objc/Tennis/TennisGame.m index 7a94623f..7462ad08 100644 --- a/Tennis/objc/Tennis/TennisGame.m +++ b/Tennis/objc/Tennis/TennisGame.m @@ -1,15 +1,6 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - -#import "TennisGame3.h" #import "TennisGame.h" - @implementation TennisGame - (id)initWithPlayer1:(NSString *)player1 player2:(NSString *)player2 { return [super init]; } diff --git a/Tennis/objc/Tennis/TennisGame1.h b/Tennis/objc/Tennis/TennisGame1.h index 43cc7e31..87db1ac7 100644 --- a/Tennis/objc/Tennis/TennisGame1.h +++ b/Tennis/objc/Tennis/TennisGame1.h @@ -1,16 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import #import "TennisGame.h" - @interface TennisGame1 : TennisGame -@property(nonatomic, copy) NSString *player1; -@property(nonatomic, copy) NSString *player2; @end \ No newline at end of file diff --git a/Tennis/objc/Tennis/TennisGame1.m b/Tennis/objc/Tennis/TennisGame1.m index 74965708..99aee340 100644 --- a/Tennis/objc/Tennis/TennisGame1.m +++ b/Tennis/objc/Tennis/TennisGame1.m @@ -1,13 +1,9 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import "TennisGame1.h" +@interface TennisGame1 () +@property(nonatomic, copy) NSString *player1; +@property(nonatomic, copy) NSString *player2; +@end @implementation TennisGame1 { int score1; diff --git a/Tennis/objc/Tennis/TennisGame2.h b/Tennis/objc/Tennis/TennisGame2.h index 23440a1d..4b899985 100644 --- a/Tennis/objc/Tennis/TennisGame2.h +++ b/Tennis/objc/Tennis/TennisGame2.h @@ -1,14 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import #import "TennisGame.h" - @interface TennisGame2 : TennisGame @end \ No newline at end of file diff --git a/Tennis/objc/Tennis/TennisGame2.m b/Tennis/objc/Tennis/TennisGame2.m index 66112b94..c7ea3310 100644 --- a/Tennis/objc/Tennis/TennisGame2.m +++ b/Tennis/objc/Tennis/TennisGame2.m @@ -1,14 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import "TennisGame2.h" - @interface TennisGame2 () @property(nonatomic, copy) NSString *player2Name; @property(nonatomic, copy) NSString *player1Name; diff --git a/Tennis/objc/Tennis/TennisGame3.h b/Tennis/objc/Tennis/TennisGame3.h index 190bfe06..99b4b06d 100644 --- a/Tennis/objc/Tennis/TennisGame3.h +++ b/Tennis/objc/Tennis/TennisGame3.h @@ -1,14 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import #import "TennisGame.h" - @interface TennisGame3 : TennisGame @end \ No newline at end of file diff --git a/Tennis/objc/Tennis/TennisGame3.m b/Tennis/objc/Tennis/TennisGame3.m index bba66c0b..d1e67697 100644 --- a/Tennis/objc/Tennis/TennisGame3.m +++ b/Tennis/objc/Tennis/TennisGame3.m @@ -1,14 +1,5 @@ -// -// Created by Stefan on 5/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// -// To change the template use AppCode | Preferences | File Templates. -// - - #import "TennisGame3.h" - @interface TennisGame3 () @end diff --git a/Tennis/objc/TennisTests/TennisTests.h b/Tennis/objc/TennisTests/TennisTests.h index dda29b8a..dcc027a0 100644 --- a/Tennis/objc/TennisTests/TennisTests.h +++ b/Tennis/objc/TennisTests/TennisTests.h @@ -1,14 +1,5 @@ -// -// TennisTests.h -// TennisTests -// -// Created by Stefan on 05/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// - #import @interface TennisTests : SenTestCase - - (id)initWithInvocation:(NSInvocation *)invocation scores:(NSArray *)scores; @end diff --git a/Tennis/objc/TennisTests/TennisTests.m b/Tennis/objc/TennisTests/TennisTests.m index d8af05d4..9fcc6101 100644 --- a/Tennis/objc/TennisTests/TennisTests.m +++ b/Tennis/objc/TennisTests/TennisTests.m @@ -1,11 +1,3 @@ -// -// TennisTests.m -// TennisTests -// -// Created by Stefan on 05/31/13. -// Copyright (c) 2013 Stefan van den Oord. All rights reserved. -// - #import #import "TennisTests.h" #import "TennisGame1.h" @@ -30,12 +22,7 @@ + (void)addTestWithScores:(NSArray *)scores toTestSuite:(SenTestSuite *)testSuite { NSArray *testInvocations = [self testInvocations]; for (NSInvocation *testInvocation in testInvocations) { - - // Create a new instance of our test case for each method found using the given set of parameters. - SenTestCase *test = [[TennisTests alloc] initWithInvocation:testInvocation - scores:scores]; - - // Add the new test instance to the suite. The OCUnit framework eventually executes the entire test suite. + SenTestCase *test = [[TennisTests alloc] initWithInvocation:testInvocation scores:scores]; [testSuite addTest:test]; } } @@ -101,7 +88,8 @@ } - (NSString *)name { - return [[super name] stringByReplacingOccurrencesOfString:@"]" withString:[NSString stringWithFormat:@" (%d,%d,%@)]", player1Score, player2Score, expectedScore]]; + NSString *parametersDescription = [NSString stringWithFormat:@" (%d,%d,%@)]", player1Score, player2Score, expectedScore]; + return [[super name] stringByReplacingOccurrencesOfString:@"]" withString:parametersDescription]; } - (void)checkAllScoresForGame:(TennisGame *)game {