-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBobTest.m
63 lines (51 loc) · 1.55 KB
/
BobTest.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#import <XCTest/XCTest.h>
#import "Bob.h"
@interface test_suite : XCTestCase
@end
@implementation test_suite
- (Bob *)bob {
return [[Bob alloc] init];
}
- (void)testStatingSomething {
NSString *input = @"Tom-ay-to, tom-aaaah-to.";
NSString *expected = @"Whatever.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShouting {
NSString *input = @"WATCH OUT!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testAskingAQuestion {
NSString *input = @"Does this cryogenic chamber make me look fat?";
NSString *expected = @"Sure.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testTalkingForcefully {
NSString *input = @"Let's go make out behind the gym!";
NSString *expected = @"Whatever.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShoutingNumbers {
NSString *input = @"1, 2, 3 GO!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShoutingWithSpecialCharacters {
NSString *input = @"ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testSilence {
NSString *input = @"";
NSString *expected = @"Fine, be that way.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
@end