Thanks again for sending the issue. However, please check that the argument type which is used in ArgExpr.IsAny
is correct. Here I can see that you have used Int64 / long in the non-public setup which is not the same with public setup.
//Mock.NonPublic.Arrange<string>(DocumentClassWorker, "GetDocumentClassFullName", ArgExpr.IsAny<Int64>(), ArgExpr.IsAny<List<DHPDocumentClass>>()).Returns("TestValueFoo"); --> this does not work
// that's why GetDocumentClassFullName was changed to public -->
Mock.Arrange(() => documentClassWorker.GetDocumentClassFullName(Arg.IsAny<Int32>(), Arg.IsAny<List<DHPDocumentClass>>())).Returns(
Also, please send me the method signature of GetDocumentClassFullName
if converting from ArgExpr.IsAny<Int64>
does not work.
the Telerik team
Sharpen your .NET Ninja skills
! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>