August 21st, 2011, 04:14 PM
Problem with Custom Memebership provider Unit testing
I have added two projects in existing solution(one is MVC Web application and another is class library-for unit testing). In Web application project I created my own Custom MemebershipProvider and created MyMemebershipUser class that inherits from MemebershipUser class adding some additional user parameters.
When I want to unit test my custom memebership provider, initialize method doesn;t show any problems, it works fine, but when i want to test other methods(ChangePassword and CreateUser) I got following exception in nunti tool
System.IO.FileNotFoundException : Could not load file or assembly 'MyApp.Web.App_Data' or one of its dependencies. The system cannot find the file specified.
If I check stack trace, it looks like it crash in the moment when it want to create MyMemebrshipClass instance. I also made test where I exclude call of MemebershipUser base constructor and it passes well.
Since Im using Express edition of visual studio Im not able to run TestDriven .net tool to go in debug mode. However it is very strange since CustomMemebershipProvider doesn't show any problems with unit testing if there is no explicit usage of MyMembershipUser (MembershipUser) class.
Does anyone knows what is the problem or had similar issue?
Thanks in advance
Click Here to Expand Forum to Full Width