Breaking dependencies in unit tests

"Would I use classloader magic and bytecode manipulation to set dependencies in production code? No. Would I use reflection to modify private fields in production code? No. Would I refactor to introduce an interface between objects? Yes. Would I refactor an object to get a dependency through its constructor instead of from a global variable? Yes." Nat Pryce


Popular posts from this blog

Regular expressions: Rust vs F# vs Scala

STM: F# vs Haskell

Akka.NET Streams vs Hopac vs AsyncSeq