I'm using moq
and would like to mock a method which accepts out
parameter:
protected void GetDataRow(string id, out DataRow dataRow)
This is what I tried:
dataMock.Protected().Setup("GetDataRow", ItExpr.IsAny<string>(), ItExpr.IsAny<DataRow>());
However, it returns:
System.ArgumentException : Member DataManager.GetDataRow does not exist.
If I change the dataRow parameter not to be out
, everything works as expected.
How should I create a mock in this case?