Knowing that sometimes you need to supply a mocked type just to instantiate the class you need to test methods without code a dependency on the said type (especially on test frameworks/styles that are test class per method vs test class per class) we need to add an overload that allows you to register a mock without supplying an on-created setup method.
Signature should be:
abstract protected void RegisterMockType<T>()
Method body can probably simply be to call the existing method with null:
RegisterMockType<T>(null)
Knowing that sometimes you need to supply a mocked type just to instantiate the class you need to test methods without code a dependency on the said type (especially on test frameworks/styles that are test class per method vs test class per class) we need to add an overload that allows you to register a mock without supplying an on-created setup method.
Signature should be:
abstract protected void RegisterMockType<T>()
Method body can probably simply be to call the existing method with
null
:RegisterMockType<T>(null)