开发者

What is the equivalent to a test fixture setup method in SenTestCase?

Like most unit testing frameworks, SenTestCase has setUp and tearDown methods you can override to run code before and after each test.

In NUnit, I'm used to having a fixure setup and fixture teardown method I can override, too, that will let me run code once before any test is run, and clean up once after all tests in the fixture are run.

What's the proper way to do this with SenTestCase? I tried u开发者_高级运维sing init and dealloc for this, against my better jugment, but it seemed like my init override was never called.


You can use the +setUp and +tearDown class methods: SenTestKit: cleaning up after ALL tests have run?.


I've switched to GHUnit, which has this feature. As far as I can tell OCUnit/SenTestCase does not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜