X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Data%2FTest%2FSystem.Data.OleDb%2FOleDbPermissionAttributeTest.cs;h=22e213f016c388bfd627abdb31a738f2cf2fe79f;hb=b8467ef0dd2fbec0cfcd5ea90844e09edc47dab4;hp=f645b6212cf1ac78d62b7da289d58a11a975c984;hpb=bd9f9ee7cb81823608edc76ef9d0b6416783fe71;p=mono.git diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs index f645b6212cf..22e213f016c 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs @@ -1,4 +1,4 @@ -// +// // OleDbPermissionAttributeTest.cs - // NUnit Test Cases for OleDbPermissionAttribute // @@ -50,10 +50,8 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior"); Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions"); Assert.AreEqual (String.Empty, a.Provider, "Provider"); -#if NET_2_0 Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString"); Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString"); -#endif OleDbPermission odp = (OleDbPermission)a.CreatePermission (); Assert.IsFalse (odp.IsUnrestricted (), "IsUnrestricted"); } @@ -79,14 +77,6 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual (SecurityAction.RequestOptional, a.Action, "Action=RequestOptional"); a.Action = SecurityAction.RequestRefuse; Assert.AreEqual (SecurityAction.RequestRefuse, a.Action, "Action=RequestRefuse"); -#if NET_2_0 - a.Action = SecurityAction.DemandChoice; - Assert.AreEqual (SecurityAction.DemandChoice, a.Action, "Action=DemandChoice"); - a.Action = SecurityAction.InheritanceDemandChoice; - Assert.AreEqual (SecurityAction.InheritanceDemandChoice, a.Action, "Action=InheritanceDemandChoice"); - a.Action = SecurityAction.LinkDemandChoice; - Assert.AreEqual (SecurityAction.LinkDemandChoice, a.Action, "Action=LinkDemandChoice"); -#endif } [Test] @@ -147,11 +137,7 @@ namespace MonoTests.System.Data.OleDb { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void KeyRestrictionBehavior_Invalid () { OleDbPermissionAttribute a = new OleDbPermissionAttribute (SecurityAction.Assert); @@ -190,12 +176,8 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual ("Mono", a.Provider, "Mono"); OleDbPermission odp = (OleDbPermission) a.CreatePermission (); -#if NET_2_0 // provider isn't even supplied to permission in fx 2.0 Assert.AreEqual (String.Empty, odp.Provider, "CreatePermission.Provider"); -#else - Assert.AreEqual ("Mono", odp.Provider, "CreatePermission.Provider"); -#endif } [Test]