[bcl] Remove more NET_2_0 checks from class libs
[mono.git] / mcs / class / System.Web / Test / System.Web.UI.WebControls / BaseDataBoundControlCas.cs
index 8c83cc168036d65b0cd909b4e97041ec26a9c73e..1a85e586a272988f1792f6af791ec916766adaf9 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 
 using NUnit.Framework;
 
 using System;
+using System.Security;
 using System.Security.Permissions;
 using System.Web.UI.WebControls;
 
@@ -46,6 +46,13 @@ namespace MonoCasTests.System.Web.UI.WebControls {
                // note: we do not inherit from AspNetHostingMinimal because
                // BaseDataBoundControl is an abstract class
 
+               [SetUp]
+               public virtual void SetUp ()
+               {
+                       if (!SecurityManager.SecurityEnabled)
+                               Assert.Ignore ("SecurityManager.SecurityEnabled is OFF");
+               }
+
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
                public void Deny_Unrestricted ()
@@ -57,4 +64,3 @@ namespace MonoCasTests.System.Web.UI.WebControls {
        }
 }
 
-#endif