[System*] Throw a PlatformNotSupported exception when using the managed networking...
[mono.git] / mcs / class / System.Data / Test / System.Data.Common / DBDataPermissionAttributeTest.cs
index 2a9f7cdada47f9412343c5f13fffed815e86b799..5aac0c0eeb63314dda770c7a5347d55eb88ea877 100644 (file)
@@ -60,18 +60,14 @@ namespace MonoTests.System.Data.Common
                public void Default ()\r
                {\r
                        DBDataPermissionAttribute a = new NonAbstractDBDataPermissionAttribute (SecurityAction.Assert);\r
-#if !TARGET_JVM\r
                        Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");\r
-#endif                 \r
                        Assert.IsFalse (a.Unrestricted, "Unrestricted");\r
                        Assert.IsFalse (a.AllowBlankPassword, "AllowBlankPassword");\r
                        Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");\r
                        Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");\r
                        Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");\r
-#if NET_2_0\r
                        Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");\r
                        Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");\r
-#endif\r
                }\r
 \r
                [Test]\r
@@ -144,7 +140,6 @@ namespace MonoTests.System.Data.Common
                        try {\r
                                a.KeyRestrictionBehavior = (KeyRestrictionBehavior) 666;\r
                                Assert.Fail ("#1");\r
-#if NET_2_0\r
                        } catch (ArgumentOutOfRangeException ex) {\r
                                // The KeyRestrictionBehavior enumeration value, 666, is invalid\r
                                Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");\r
@@ -155,17 +150,6 @@ namespace MonoTests.System.Data.Common
                                Assert.IsNotNull (ex.ParamName, "#7");\r
                                Assert.AreEqual ("KeyRestrictionBehavior", ex.ParamName, "#8");\r
                        }\r
-#else\r
-                       } catch (ArgumentException ex) {\r
-                               // The KeyRestrictionBehavior enumeration value, 666, is invalid\r
-                               Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");\r
-                               Assert.IsNull (ex.InnerException, "#3");\r
-                               Assert.IsNotNull (ex.Message, "#4");\r
-                               //Assert.IsTrue (ex.Message.IndexOf ("KeyRestrictionBehavior") != -1, "#5");\r
-                               //Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6");\r
-                               //Assert.IsNull (ex.ParamName, "#7");\r
-                       }\r
-#endif\r
                }\r
 \r
                [Test]\r