Senin, 21 Juni 2010

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 SituationImagine 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, this static class also holds some state which, unfortunately, gets

Tidak ada komentar:

Posting Komentar