Breaking Static Dependency: How to Make Code Testable


Static dependency can be a nightmare for developers who write tests for their code. There is not much to do to get rid of static dependencies if they come with third-party libraries or NuGet packages. This blog post introduces two tricks to make code with static dependencies testable.

As a sample, I take one piece of non-commercial code that has a famous static dependency.