Thank you for submitting the issue. However I attached a test project created from the snippet you sent, where the test is passing. I tried both in debug and run mode and used Unity 2.0 for the purpose.
Looking further into, I found out that if the test is preceded with following one, then only running both the tests fails the original one where the call never goes to mockContainer.RegisterType<,> . Here to add that the following test is executed first.
public void Test2()
ConsumingClass consumingClass = Mock.Create<
In this case, currently the workaround is to include the following Mock.Arrange to forcefully make it execute the original code block:
Mock.Arrange(() => consumingClass.RegisterStuffInUnity()).CallOriginal();
Finally, as we have already identified the issue, it will be patched in the next release. However if you want to give it an early try, we would love to send you a preview build to your telerik account.
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