views:

46

answers:

0

Hello, I am writing some unit tests for an MVC controller which requires a call to ObjectFactory.GetNamedInstance. The code looks as follows

ObjectFactory.GetNamedInstance("BuyerMembershipProvider")

I am aware of the ObjectFactory.inject method to Inject a stub of the desired type, however it does not seem to work for getnamedinstance calls. I receive the following message (exception code 200)

Could not find an Instance named "ApplicantMembershipProvider" for PluginType System.Web.Security.

Is what I'm trying even possible?

Thanks in advance,

JP