I managed to reproduce the issue. It seems that it is a bug in JustMock, which prevents us from being able to mock internal virtual methods with proxy. However, our developers are currently investigating the matter for its cause.
As a workaround, I could suggest you to use the Elevated Automocking feature of our product. With it, I was able to write the following test and it passed:
var mockContainer =
var fakeEntity =
mockContainer.Arrange<Entity1>(x => x.Id).IgnoreInstance().Returns(555);
var actual = fakeEntity.Id;
I hope this helps. I will keep you nottified when we would be able to provide you with a solution, containing the bug fix.
P.S. For reporting such bug in our product, I have granted you some Telerik points.
the Telerik team
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums
, or our JustTrace