Designs, testing secured code with nUnit and a book review
If you need to use nUnit to test code that is protected by .NET security, you need to provide a Principal to the nUnit thread. For example,
// This principal will be used throughout the tests Thread.CurrentPrincipal = new GenericPrincipal( new GenericIdentity("TedsTester"), new string[] { "DeleteEverything" } );
[What I'm reading: Effective Java Modeled after Scott Meyer's incredible Effective C++ books, this manual of Java best practices should be required reading for C# developers. Joshua Bloch is an architect on the Java class libraries and this book is filled with the knowledge that comes from years of use. C# is quite close to Java and most of the tips in this book apply beautifully. Especially good for C++ developers moving to C#. In 5 years someone will know C# well enough to write an equivalent book, but this one will help you code better while we wait. (I'm an Amazon affiliate, all monies will be matched and donated to a homeless shelter in southern Colorado)]