1

Resolved

MockStyle.Transparent not working as expected

description

When a Mock is created with mockStyle = MockStyle.Transparent, the underlying implementation is executed even when an Expect or Stub statement is used to override certain functions or properties. The return value of the function or property is correctly set according by the WillReturn() statement, so it appears that the underlying implementation is executed, and its return value discarded. Exceptions are not disregarded this way. In my case, they are being thrown to NUnit and resulting in failing tests.

comments