YHErrorFactoryTests.m 1.07 KB
//
//  YHErrorFactoryTests.m
//  YH_Analytics
//
//  Created by Zhou Rongjun on 15/4/15.
//  Copyright (c) 2015年 YOHO. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHErrorFactory.h"

@interface YHErrorFactoryTests : XCTestCase {
@private
    YHErrorFactory *factory;
}

@end

@implementation YHErrorFactoryTests

- (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 = [[YHErrorFactory alloc] init];
    XCTAssertNotNil(factory, @"Cannot create YHErrorFactory 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)testJsonDictionaryNotNil {
    NSLog(@"%@ start", self.name);
    YHAnalyItemData *data = [factory makeItemData];
    XCTAssertNotNil(data, @"YHErrorFactory makeItemData can't be nil.");
    NSLog(@"%@ end", self.name);
}

@end