EaseLibrary / Ease

EaseLib is a library to ease unit testing through IoC containers and Mocking
MIT License
12 stars 1 forks source link

Add parameterless overload for RegisterMockType<T>() #11

Closed duanenewman closed 3 years ago

duanenewman commented 4 years ago

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)