I am creating an ASP.NET MVC 3 site that allows users to register. For this purpose I use the built-in (static) class Membership ; some say itโs bloated, but it works well and is easy enough, so you are there.
In any case, I started writing the AdminService class, which will work with functions related to the user account, and suppose that it has only one method:
public class AdminService : IAdminService { public void DeleteUser(string username) { Membership.DeleteUser(username); } }
Using the Membership class as it is wrong in two ways: it cannot be entered through IoC, and it is increasingly difficult for me to write specifications (test) for IAdminService , because I can not scoff at the Membership class.
Is there a way to make the ASP.NET membership class test-friendly and friendly without quotes?
When it comes to functionality, the Membership class works well and, more importantly, it works now, so I'm really reluctant to start writing my own MemberhipProvider, as that will only slow me down.
source share