re: How to write testable code VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Good article - thanks for sharing it! Although this class works it is impossible to unit test due to two different dependencies being instantiate...
 

Glad you liked the post !

Yup - if I see ‘new’ anywhere in a PR you can bet I’ll be investigating to see if it should be refactored (it almost always should)

Maybe I’ll do a TDD one in the future :)

code of conduct - report abuse