Hi..
I would like to ask the question about Nunit+ NHibernate problem.
I implement the following function:
public void CannotHaveValidCustomerWithoutCompanyName() {
// Register the IValidator service
ServiceLocatorInitializer.Init();
Customer customer = new Customer();
Assert.That(customer.IsValid(), Is.False);
customer.CompanyName = "Acme";
Assert.That(customer.IsValid(), Is.True);
}
I use the NUnit for running that function. It displays the following error message:
Microsoft.Practices.ServiceLocation.ActivationException : The needed dependency of type IEntityDuplicateChecker could not be located with the ServiceLocator. You'll need to register it with the Common Service Locator (CSL) via your IoC's CSL adapter.
I do not know what's happen on it. >_<
Can you help me to solve this problem?
Deeply thanks.
|