I'm currently making use of Castle Windsor version 2.1 as my container and would like to perform integration tests using the services registered with it.
Currently, I do this my using the Common Service Locator to retrieve my service instance and perform my integration tests against it as such:
var myService = ServiceLocator.Current.GetInstance<IMyService>();
// do stuff with myService
What I'd ideally like to do is have my service dependencies injected into my NUnit test fixture automatically. Spring seems to offer this functionality, but I can't locate anything similar using Castle.
Can anyone point me in the right direction?
Edit:
I'm sure everyone has (valid) points on whether or not this is a good idea; let's just assume that it is in this scenario...Can anyone tell me how this could be accomplished using Windsor?