I have following method
public bool IsUserAllowedToDoThings(string userName, string thingToDo)
{
var outputParameter = new ObjectParameter("IsAllowed", typeof(bool?));
_context.SP_IsUserAllowedToDoThings(userName, thingToDo, outputParameter);
return (bool)outputParameter.Value;
}
The method just calls SP using EF and return SP's output result. But I'm having problems to mock SP's output for unit testing. P.S. I'm using MOQ framework for mocking.
Aucun commentaire:
Enregistrer un commentaire