4 Answers, 1 is accepted
0
Hello Florian,
JustMock supports mocking of non-virtual methods, but only when the profiler is enabled. Non-virtual method mocking is not available in JustMock Lite.
Public methods are mocked using the Mock.Arrange(() => ...) syntax. Both private and protected methods are mocked using Mock.NonPublic.Arrange(...). I don't understand how you came to the conclusion that only private methods are supported. Maybe you can share a snippet showing what you're trying to accomplish?
Regards,
Stefan
Telerik
JustMock supports mocking of non-virtual methods, but only when the profiler is enabled. Non-virtual method mocking is not available in JustMock Lite.
Public methods are mocked using the Mock.Arrange(() => ...) syntax. Both private and protected methods are mocked using Mock.NonPublic.Arrange(...). I don't understand how you came to the conclusion that only private methods are supported. Maybe you can share a snippet showing what you're trying to accomplish?
Regards,
Stefan
Telerik
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 Feedback Portal
and vote to affect the priority of the items
0

Florian
Top achievements
Rank 1
answered on 06 Oct 2015, 03:54 PM
Hi,
Thanks for your answer. I didn't notice this capability before and I thought that shd work the same as for mocking private methods (i.e. using the method name). It's OK now
0

Boris
Top achievements
Rank 1
answered on 13 Nov 2020, 08:19 AM
what profiler should be enabled? what am I to do to enable it?
0
Hello Boris,
You have to use the full version of the product, for more information about the supported features, please refer to the feature comparison matrix. On this page, you can also find a link for downloading a free trial.
Regards,
Ivo
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.