An interesting read about testing code using nullable states instead of mocks.
https://www.jamesshore.com/v2/projects/testing-without-mocks/testing-without-mocks
An interesting read about testing code using nullable states instead of mocks.
https://www.jamesshore.com/v2/projects/testing-without-mocks/testing-without-mocks
@xuu Oh man, this guys has written so many words, and there are so many “patterns” (many of which I never knew!) 🤦♂️ Q: Isn’t most of what he’s talking about effectively the same as what we do in “good” Go using interfaces and making the zero value useful? 🤔
@prologic@twtxt.net I did something similar with a external module for my work project (in python), extending a class that does nothing and implementing what you need for each “extension”.
Basically I’m relying on a Polymorphic class to do it.