I'm attempting to write a custom NUnit test runner to integrate into our application and I've managed to get a TestRunner object created and running some test开发者_如何学Pythons. Next I would like to be able to pass some data into the TestRunner for the tests to use.
At the moment I have created a class that implements IService and I add an instance into the NUnit ServiceManager class. A setup method, test method, etc, then uses the ServiceManager.Services to locate the object and can then access the data.
This seems to work, but I was wondering if this is the correct way to do this. Are there any easier/simplier/better ways of doing this and what gotchas should I look out for?
Kind Regards
Michael
精彩评论