Created
October 13, 2011 04:52
-
-
Save jonreid/1283418 to your computer and use it in GitHub Desktop.
Test before OCHamcrest 1.6
This file contains 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
- (void)testArrayFromURLStringArray | |
{ | |
// given | |
NSArray *URLStrings = [NSArray arrayWithObjects:@"one", @"two", nil]; | |
// when | |
NSMutableArray *downloads = [MyDownloader arrayFromURLStringArray:URLStrings]; | |
// then | |
assertThat(downloads, hasCountOf(2)); | |
MyDownloader *download = [downloads objectAtIndex:0]; | |
assertThat([image URLString], is(@"one")); | |
download = [downloads objectAtIndex:1]; | |
assertThat([image URLString], is(@"two")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the "before" example. See: Simplify Your Tests with OCHamcrest's "hasProperty" http://jonreid.blogs.com/qualitycoding/2011/10/simplify-your-tests-with-ochamcrests-hasproperty.html