我使用下面的代码来调用UITableView
-(void)testJumpSection
{
NSIndexPath *indexPath1= [NSIndexPath indexPathForRow:0 inSection:0];
[viewControllerObject tableView:viewControllerObject.masterTableView didSelectRowAtIndexPath:indexPath1];
int backButtonSection = viewControllerObject.backButtonSection;
NSIndexPath *indexPath2= [NSIndexPath indexPathForRow:0 inSection:2];
[viewControllerObject tableView:viewControllerObject.masterTableView didSelectRowAtIndexPath:indexPath2];
int backButtonSection2 = viewControllerObject.backButtonSection;
[viewControllerObject backButtonView:viewControllerObject.button1];
int backButtonSectionTestValue = viewControllerObject.backButtonSection;
STAssertTrue(backButtonSectionTestValue==1, @"TestJumpSection");
}
我正在为展开/折叠 uitableview 编写此测试用例。当用户单击第 0 节的行然后单击第 3 节时。现在用户可能会单击后退按钮来导航第 2 节。现在我必须得到结果 backButtonsection 值减 1。
它工作正常,但我无法获得选定的部分值,并且出现此错误:
[__NSCFConstantString stringByAppendingString:]: 无参数"
关于我做错了什么的任何想法?