Created
February 28, 2012 20:46
-
-
Save andrewsardone/1935008 to your computer and use it in GitHub Desktop.
I'm finally making two-stage object creation work for me ;-)
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
#import <SenTestingKit/SenTestingKit.h> | |
#import "OCMock.h" | |
#import "NLPageControlScrollViewHelper.h" | |
#pragma mark - Tests | |
@interface NLPageControlScrollViewHelperTests : SenTestCase | |
@end | |
@implementation NLPageControlScrollViewHelperTests | |
- (void)testSetSelfAsScrollViewDelegate | |
{ | |
id mockScrollView = [OCMockObject niceMockForClass:[UIScrollView class]]; | |
// alloc | |
NLPageControlScrollViewHelper *helper = [NLPageControlScrollViewHelper alloc]; | |
[[mockScrollView expect] setDelegate:helper]; | |
// then init | |
helper = [helper initWithPageControl:nil scrollView:mockScrollView]; | |
[mockScrollView verify]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment