...
|
...
|
@@ -11,7 +11,10 @@ |
|
|
#import "OCMock.h"
|
|
|
#import "YHDeviceFactory.h"
|
|
|
|
|
|
@interface YHDeviceFactoryTests : XCTestCase
|
|
|
@interface YHDeviceFactoryTests : XCTestCase {
|
|
|
@private
|
|
|
YHDeviceFactory *factory;
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
...
|
...
|
@@ -20,16 +23,22 @@ |
|
|
- (void)setUp {
|
|
|
[super setUp];
|
|
|
// Put setup code here. This method is called before the invocation of each test method in the class.
|
|
|
NSLog(@"%@ setUp", self.name);
|
|
|
factory = [[YHDeviceFactory alloc] init];
|
|
|
XCTAssertNotNil(factory, @"Cannot create YHDeviceFactory instance.");
|
|
|
}
|
|
|
|
|
|
- (void)tearDown {
|
|
|
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
|
[super tearDown];
|
|
|
NSLog(@"%@ tearDown", self.name);
|
|
|
}
|
|
|
|
|
|
- (void)testExample {
|
|
|
// This is an example of a functional test case.
|
|
|
XCTAssert(YES, @"Pass");
|
|
|
- (void)testJsonDictionaryNotNil {
|
|
|
NSLog(@"%@ start", self.name);
|
|
|
YHAnalyItemData *data = [factory makeItemData];
|
|
|
XCTAssertNotNil(data, @"YHDeviceFactory makeItemData can't be nil.");
|
|
|
NSLog(@"%@ end", self.name);
|
|
|
}
|
|
|
|
|
|
@end |
...
|
...
|
|