Invoking the Static Constructor via Reflection

— Warning! — This post may cause the reader a slight feeling of nausea. However, remember that tough situations call for some tough actions! The Situation Imagine that you have to write some-unit tests for a class which uses an existing infrastructure, involving calls to static methods on a static class. To make things worse, […]