I'm doing an ASP.Net MVC2 project and developing some unit test cases on it. In one of my controllers,
String AllowedActions = "";
AllowedActions = entities.sp_IsAuthorized(GetLoggedUserId(), 1, item.SubCategoryId, "CreateMeeting_HTML").FirstOrDefault();
I was unable to mock this sp_IsAuthorized() method ,
public ObjectResult<global::System.String> sp_IsAuthorized(.....){
}
I tried to mock it in this way,
var entity = new Mock<TestMVCProductEntities>();
entity.Setup(x => x.sp_IsAuthorized(...)).Return(???);
but I have no clue how to return
ObjectResult
this type of object. Help me.