stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Consider using an ioc container to ease readability and testability

Open g7ed6e opened this issue 4 years ago • 3 comments

Describe the bug When debugging stryker i noticed multiples instanciation of the GitInfoProvider. Also so many ctor args are declared with default null values to allow unit testing.

Expected behavior Using an ioc container would allow to remove default null parameters in ctor parameters, newing implementation in ctor body and have finegrained control over object lifetimes

g7ed6e avatar Sep 17 '20 05:09 g7ed6e

Hi! This is legacy from when stryker was not yet such a big project. You are right that we should probably revisit and decide if it's time for dependency injection.

rouke-broersma avatar Sep 17 '20 06:09 rouke-broersma

Hi! This is legacy from when stryker was not yet such a bug project. You are right that we should probably revisit and decide if it's time for dependency injection.

I think you meant big project ;)

g7ed6e avatar Sep 17 '20 06:09 g7ed6e

Potato potato :)

rouke-broersma avatar Sep 17 '20 11:09 rouke-broersma