0

I am tring to register a fake Authentication Service for debuging using:

container.Register(Component
    .For<Services.IFormsAuthenticationService>()
    .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'..

Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
K.A.D.
  • 3,648
  • 3
  • 34
  • 35

1 Answers1

0

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

Community
  • 1
  • 1
Ilya Kogan
  • 21,995
  • 15
  • 85
  • 141