Tag: Xcode4/UnitTest
+ (NSString*)stringFromJSONFileNamed:(NSString *)fileName
{
    //    NSString *resource = [[NSBundle mainBundle] pathForResource:fileName ofType:@"json"];
    
    NSBundle *bundle = [NSBundle bundleForClass:[self class]];
    NSString *resource = [bundle pathForResource:fileName ofType:@"json"];
    NSError *error;
    return [NSString stringWithContentsOfFile:resource encoding:NSUTF8StringEncoding error:&error];
- (void)testExample
{
    NSString* str = [TestingHelper stringFromJSONFileNamed:@"job"];
    NSLog(@"str=%@", str);
    //以下strを用いてテスト。
}