I have in mind several deterministic functions that I'd like to put together, but I'm struggling with the full impllications of doing:
- Static class with static methods
- Instance of a class that can be injected into consumers
In both cases, the implementation would be the same, and as they are deterministic with no dependencies, I can unit test both without issue.
My main concern, is when it comes to testing consumers of either the static or injected functions. I feel that should I go with the inject-able route, I can much more easily test the consumers, but it means another thing to inject into all consumers. Going the static route, I can just consume them right from any class, but it will be more involved to test specific scenarios, as the consumers will be using literal implementations.
Any thoughts/advice? More information needed?