Search code examples
objective-cunit-testingsentestingkit

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 using init and dealloc for this, against my better jugment, but it seemed like my init override was never called.


Solution

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