views:

21

answers:

1

Hi Iam having some trouble getting castle Nhibernate facility up and running properly. This error I guess makes sense because the Nhbernate repository constructor takes in an ISessionManager as a constructor argument, my question is does castle not inject this dependency? or is there something wrong with my configuration

UserServiceTests.Acceptance_CreateNewUserProfile_ShouldReturnANewCustomerAddedToTheRepository' failed:
 Castle.MicroKernel.Handlers.HandlerException : Can't create component Core.Repositories.NHibernateSqlDbLiteRepository`1' as it has dependencies to be satisfied. 
Core.Repositories.NHibernateSqlDbLiteRepository`1 is waiting for the following dependencies: 

Services: 
- Castle.Facilities.NHibernateIntegration.ISessionManager which was not registered. 
 at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency()
 at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context)
 at Castle.MicroKernel.Handlers.DefaultGenericHandler.Resolve(CreationContext context)
 at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
 at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service)
 at Castle.MicroKernel.DefaultKernel.get_Item(Type service)
 at Castle.Windsor.WindsorContainer.Resolve(Type service)
 at Castle.Windsor.WindsorContainer.Resolve[T]()
 at Core.Tests.Services.UserServiceTests.Acceptance_CreateNewUserProfile_ShouldReturnANewCustomerAddedToTheRepository()

4 passed, 1 failed, 0 skipped, took 5.29 seconds (NUnit 2.5.5).

This is kind of related to a previos question and the configuration can be found here.

A: 

Figured out the problem , I was being stupid, the test project has a different config settings

kevin lace