在 IOS 中,我想 UTViewController
的功能,运行后一直说 error:nil 参数。我不知道如何解决它,如果有人知道可以帮助我吗?
这是'java代码:
#import "MasterViewController.h"
#import <GHUnitIOS/GHUnit.h>
@class MasterViewController;
@interface MasterViewControllerTest : GHViewTestCase{
NSString* _type;
NSString* _msgId;
NSString* _url;
NSString* _opened;
}@property(nonatomic,retain) MasterViewController* masterViewController;
@end
@implementation MasterViewControllerTest
@synthesize masterViewController;
-(void)setUp{
MasterViewController *viewController = [[MasterViewController alloc]init];
self.masterViewController = viewController;
}
-(void)testPostViewTimeToServ{
_type = @"m";
_url = nil;
_opened = nil;
_msgId = @"";
bool resultValue = [self.masterViewController saveAndPostViewMagBodyTime:_type arg_url:_url arg_open:_opened mid:_msgId];
GHAssertNotEquals(resultValue, YES, @" post msgIs is nil fail");
}
@end
testPostViewTimeToServ
错误显示是:
测试套件“测试”开始。启动 MasterViewControllerTest/testPostViewTimeToServ 2012-04-02 20:50:42.269 kMsgGHUnitTests[7747:10b0f] 名称:NSInvalidArgumentException 文件:未知行:未知原因:* -[NSPlaceholderString initWithString:]:无参数
为什么?