Timeline for Should methods that are not "pure functions" and that interact with external APIs or hardware be static?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 6, 2018 at 15:18 | comment | added | adjordan | Thanks for the reply! This seems to be the consensus, so I will adhere to this principle going forward. | |
Jun 6, 2018 at 15:18 | vote | accept | adjordan | ||
Jun 6, 2018 at 1:27 | comment | added | whatsisname | Or at least, it is common to have collections of static methods that make the actual calls that talk to external stuff, but then to build a stateful API class on top of it, and expose that class as the way to get things done, and it's that class that gets mocked rather than the underlying interfaces, i.e. facade pattern. | |
Jun 5, 2018 at 15:55 | history | answered | Telastyn | CC BY-SA 4.0 |