Thank you for contacting us. For JustMock Lite to know about internal members, you have to set the InternalsVisibleTo
key in the project's AssemblyInfo.cs
. This is better explained here
and the key you have to add is as follows:
Further, after adding the above, you will notice that the test execution doesn't enter the Func2
logic at all and thus, the mock.Func2()
call returns 0
. This is so, due to the fact you have used a complete mock for the Cls1
class. In order to arrange only the Func1
method and keep the original implementation of Func2
, you will have to either apply partial mocking
, or use Behavior.CallOriginal().
I hope this helps.
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?
Telerik Feedback Portal
and vote to affect the priority of the items