EaseLibrary / Ease

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

#11 RegisterMockType parameterless overload #13

Closed chowarth closed 3 years ago

chowarth commented 4 years ago

@duanenewman, resolves #11 by adding a parameterless overload for RegisterMockType<T>.

It was not possible to pass null as a parameter as suggested, due to the use of the Func<Action<Mock<T>>> as a parameter type, so () => null was used instead. This way the Func is resolved when used but the action that it invokes is null and safely checked against.

duanenewman commented 3 years ago

I like that it has an overload for this vs a null default anyhow. thanks!