The next version (greater than 1.0.903d) contains a bunch of decorators that will deny access to file, file dialog, sql client, oracle client, etc... The decorators are located in the MbUnit.Framework.1.1.dll in the MbUnit.Framework.Security namespace.
For example you can deny access to the SqlClient using the following:
using MbUnit.Core.Framework; using MbUnit.Framework; using MbUnit.Framework.Security; [TestFixture] public class MyFixture { [Test] [DenySqlClient] public void AccessDatabase() { // access to SQL client will fail in this method. } }
Page rendered at Friday, August 08, 2008 7:31:03 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.