Do not pass Null (Seed)

One of the conversation that we get while reviewing the PR we see couple of null passing to method’s to satisfy the unit test by DI approach while mocking object or a random code flow that can process an object of XAZ and another Flow that only send Null for a reason or another that object does not exist, We try to find a better way to go around this but we allows find our self doing the same approach over and over again the result is a bad architected design the solution is simple follow S.O.L.D principles and by applying Tell don't ask principle

 
 

Reference:

https://softwareengineering.stackexchange.com/questions/163335/dependency-injection-ioc-container-practices-when-writing-frameworks?answertab=active#tab-top

https://martinfowler.com/bliki/TellDontAsk.html

https://softwareengineering.stackexchange.com/questions/376780/how-far-should-i-go-with-dependency-injection-and-mocking

https://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Pattern/