Hi is it possible to moq something like this. I'm using the MVC pattern and I'm testing my Controller Layer. I have already tested the method getListForId in my Service layer so I can trust that it will return the correct value.
public List<object> getListForID(int id)
And I use it like this
if(true)
{
getListForID(1).Where(a => a.Id == objectB.Id)
}
else
{
getListForID(1)
}
The code testing each path would be the same even tho there is a where in the true path.
Is it possible to verify that the method was called with the where clause ? And is there any value in doing this?