Thanks again for reporting the issue. Here since you are mocking non-public member you need to use the non-public interface.
Therefore, you could write the test in the following way that will make it work:
var class1 =
actual = class1.TestMe();
Note that you can here directly use the class reference for non-public members(partial mocking), therefore no need to specify the extra CallOriginal
However, we found that if the target class is not sealed and you are doing Mock.Create
, using the non-public interface it fails to resolve the method and thus fails the test. This is also resolved, so in that regard if partial mocking is not the solution for you and Mock.Create
is a must, then you could additionally open a support ticket through which we will be happy to send you an internal build.
Should you have any other issues please don't hesitate to write us back.
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items