Closed tdekoekkoek closed 12 years ago
It's a MvcContrib project ;)
Good point. Well maybe the error message could be changed, because it's the dependency resolver that should be set. But my main issue is I wasn't able to get this to work in my unit tests. I kept getting this error even when I set my dependency resolver in the setup. Any ideas?
Show me the code for the unit test.
On Mon, Aug 20, 2012 at 12:48 PM, Trevor de Koekkoek < notifications@github.com> wrote:
Good point. Well maybe the error message could be changed, because it's the dependency resolver that should be set. But my main issue is I wasn't able to get this to work in my unit tests. I kept getting this error even when I set my dependency resolver in the setup. Any ideas?
— Reply to this email directly or view it on GitHubhttps://github.com/jgauffin/griffin.mvccontrib/issues/21#issuecomment-7865862.
I don't think you should be using DependencyResolver as that is specific to Web.Mvc. Your membership provider should be independent of Mvc. Also the error you give is misleading as it's not actually a service locator that is missing, but rather dependency resolver:
I'm having a beast of a time unit testing this as the dependencyresolover is always failing for some reason, even if I initialize it in my test setup fixture. I think if you would just assign the service locator, it would be sufficient: