feat: expose hidden base-interface members via Mock.As<TBase>()#802
Conversation
When a derived interface hides a base member with `new`, the hidden base slot was unreachable from the setup/verify surface. The mock now also implements the base interface's IMockSetupFor.../IMockVerifyFor... surfaces, so IDerived.CreateMock().Mock.As<IBase>() can configure and verify the hidden slot without an explicit Implementing<>() call. Methods, properties and events get separate base/derived slots; indexers share storage by parameter signature. Bases with static members are out of scope.
|
🚀 Benchmark ResultsDetails
Details
Details
Details
Details
Details
|
…ers via Mock.As<TBase>() (#802) by Valentin Breuß
…ers via Mock.As<TBase>() (#802) by Valentin Breuß
|
This is addressed in release v3.3.0. |

When a derived interface hides a base member with
new, the hidden base slot was unreachable from the setup/verify surface. The mock now also implements the base interface's IMockSetupFor.../IMockVerifyFor... surfaces, so IDerived.CreateMock().Mock.As() can configure and verify the hidden slot without an explicit Implementing<>() call.Methods, properties and events get separate base/derived slots; indexers share storage by parameter signature. Bases with static members are out of scope.