Skip to content

Instantly share code, notes, and snippets.

@JonathanWilson1
Created March 1, 2015 20:15
Show Gist options
  • Save JonathanWilson1/1b98228b83b95acb2281 to your computer and use it in GitHub Desktop.
Save JonathanWilson1/1b98228b83b95acb2281 to your computer and use it in GitHub Desktop.
AppCode template file for a test class using OCMockito and OCHamcrest
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#[[#define]]# HC_SHORTHAND
#import <OCHamcrest/OCHamcrest.h>
#[[#define]]# MOCKITO_SHORTHAND
#import <OCMockito/OCMockito.h>
#import "NSInvocation+OCMockito.h"
#import "${SystemUnderTest}.h"
@interface ${NAME} : XCTestCase
@property(strong, nonatomic) ${SystemUnderTest}* sut;//system under test
@end
@implementation ${NAME}
- (void)setUp {
[super setUp];
self.sut = [[${SystemUnderTest} alloc] init];
}
- (void)tearDown {
[super tearDown];
self.sut = nil;
}
-(void) test{
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment