Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以设置一个单元测试类来为所有测试用例而不是每个测试用例只调用一次设置和拆卸方法?
其实我找到了答案。为了进行类级别设置,需要实现+(void) setUp和+(void) tearDown. 此类方法将在任何测试方法运行之前和所有测试方法运行之后调用。
+(void) setUp
+(void) tearDown
从Apple 文档中检查