2012-05-17 47 views
2

我有名为CarouselWithXmlTests.I的单元测试类有单个测试用例。如果我每次输入测试用例失败或测试用例成功的数据时都会抛出0测试用例测试的消息。我有以下代码是否有遗漏?测试目标c

-(void)checkTheArrayForNull 
{ 
    [email protected]"c"; 
    viewController.buttonCount=1; 
    [viewController goButton:self]; 
    STAssertNotNil(viewController.setUpArray,@"set up Array is not nil"); 

} 

并具有O/P以下消息:

Test Suite 'CarouselWithXmlTests' started at 2012-05-17 10:23:55 +0000 
Test Suite 'CarouselWithXmlTests' finished at 2012-05-17 10:23:55 +0000. 
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds 

回答

1

更改方法的名称,它必须与test开始为运行测试用例

-(void)testCheckTheArrayForNull 
{ 
    [email protected]"c"; 
    viewController.buttonCount=1; 
    [viewController goButton:self]; 
    STAssertNotNil(viewController.setUpArray,@"set up Array is not nil"); 

} 
+0

谢谢。有用 。 –

+0

@VXtreme不要忘记接受答案:) – Saphrosit