Open dtchepak opened 4 years ago
Implementing this and realised it is actually a bit more nuanced. The documentation is referring to real code executing for non-overridable members. This includes code in protected virtual
, even if these calls are not (easily) configurable via the NSubstitute API.
Will update the docs to try to reflect this a bit better.
From https://github.com/nsubstitute/NSubstitute/issues/222#issuecomment-557198534, saying
protected virtual
is substitutable is misleading. While technically possible (hacky) with the current API, it's not something we encourage and people should not expect to mock these members with NSubstitute.