NSubstitute is based on Castle.Core library and uses dynamic proxies to intercept and manage calls. Interception of the Object class' methods is suppressed in both frameworks.
It's suppressed in Castle's IProxyGenerationHook default implementation. You can find the code here. I think there are reasons for that. Sure, it's possible to implement own IProxyGenerationHook that allows Object class' methods interception, but...
NSubstitute also suppresses interceptions of Object's methods and NSubstitute's syntax is the reason. "NSubstitute records the calls made on a substitute, and when we call Returns, it grabs the last call made and tries to configure that to return a specific value." Assume we have the following code:
var service = Substitute.For<IService>(); var substitute = Substitute.For<object>(); service.AMethod(substitute).Returns(1);
We call "AMethod()" here, NSub intercepts the execution and makes its internal things, suppose adds "substitute" value to a dictionary which calls substitute.GetHashCode(). If we would intercept the "GetHashCode()" method then it would be the last recorded call made. NSub would tie the specified return value to it which is wrong. It's nearly impossible to avoid such thing.