Created
November 8, 2013 10:23
-
-
Save MattesGroeger/7369109 to your computer and use it in GitHub Desktop.
I just re-factored this OCUnit code to Kiwi
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
[[[user1Dict[@"highscores"] valueForKey:@"fb_id"] should] contain:fbId_user2]; | |
[[[user2Dict[@"highscores"] valueForKey:@"fb_id"] should] contain:fbId_user1]; |
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
NSDictionary *iphoneDictInIpadDict = nil; | |
NSDictionary *ipadDictInIphoneDict = nil; | |
for (NSDictionary *dict in user2Dict[@"highscores"]) | |
{ | |
STAssertTrue(dict[@"fb_id"] != nil, @"Has to contain fb_id"); | |
if ([dict[@"fb_id"] isEqual:fbId_user1]) | |
{ | |
iphoneDictInIpadDict = dict; | |
} | |
} | |
for (NSDictionary *dict in user1Dict[@"highscores"]) | |
{ | |
STAssertTrue(dict[@"fb_id"] != nil, @"Has to contain fb_id"); | |
if ([dict[@"fb_id"] isEqual:fbId_user2]) | |
{ | |
ipadDictInIphoneDict = dict; | |
} | |
} | |
STAssertTrue(iphoneDictInIpadDict != nil, @"Should have retrieved dictionary."); | |
STAssertTrue(ipadDictInIphoneDict != nil, @"Should have retrieved dictionary."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, thanks @iljaiwas :)