I am tring to register a fake Authentication Service for debuging using:
container.Register(Component
.For<Services.IFormsAu开发者_如何转开发thenticationService>()
.ImplementedBy<Services.DebugAuthenticationService>());
where Services.DebugAuthenticationService implementes Services.IFormsAuthenticationService
but I get this error:
Unit Test Adapter threw exception: Type is not resolved for member 'Castle.MicroKernel.ComponentRegistrationException,Castle.MicroKernel, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'..
Component for what? Implemented by what? You're missing the types.
Here you can find an example of correctly using Component.For ... ImplementedBy
:
Implementing UnitOfWork with Castle.Windsor
精彩评论