Can not instantiate proxy...Could not find a parameterless constructor

MOQ is good for mocking interfaces, but does not work so well with concrete classes. So instead of mocking concrete class, ask for the inteface:

var userStore = new Mock<IUserStore<PreRegistrationMVC.Models.ApplicationUser>>();

Also ApplicationUser should be POCO, so no need to mock it, just create its instance without MOQ and use in tests.


You can try referring Mock behavior,as shown below

Mock<testClass>(MockBehavior.Strict, new object[] {"Hello"}); 

I had this problem. I had written...

var x = new Mock<Concrete>();

... instead of ...

var x = new Mock<IConcrete>();