[System*] Throw a PlatformNotSupported exception when using the managed networking...
[mono.git] / mcs / class / System.Data / Test / System.Data.Common / DbDataAdapterTest.cs
index c9a346ff28eed471877b45057b6c1eebb09d18d7..a8974949973e3fc8afcd95fc9b88c3a91b5f588e 100644 (file)
@@ -44,7 +44,6 @@ namespace MonoTests.System.Data.Common
        [TestFixture]
        public class DbDataAdapterTest
        {
-#if NET_2_0
                [Test]
                public void UpdateBatchSize ()
                {
@@ -97,10 +96,14 @@ namespace MonoTests.System.Data.Common
                        try {
                                da.AddToBatch (new SqlCommand ());
                                Assert.Fail ("#1");
+#if FEATURE_NO_BSD_SOCKETS
+                       } catch (PlatformNotSupportedException) {
+#else
                        } catch (NotSupportedException ex) {
                                Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
                                Assert.IsNull (ex.InnerException, "#3");
                                Assert.IsNotNull (ex.Message, "#4");
+#endif
                        }
                }
 
@@ -225,6 +228,7 @@ sqliteDataAdapter.Update (dataSet, "Primus");
                }
 
                [Test]
+               [Category ("NotWorking")] // Requires newer sqlite than is on wrench
                public void UpdateResetRowErrorCorrectly ()
                {
                        const string connectionString = "URI = file::memory:; Version = 3";
@@ -259,37 +263,10 @@ sqliteDataAdapter.Update (dataSet, "Primus");
                }
 #endif
 
-#endif
 
                class MyAdapter : DbDataAdapter
                {
-#if ONLY_1_1
-                       protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command,
-                                                                                    StatementType statementType,
-                                                                                    DataTableMapping tableMapping)
-                       {
-                               throw new NotImplementedException ();
-                       }
-
-                       protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command,
-                                                                                      StatementType statementType,
-                                                                                      DataTableMapping tableMapping)
-                       {
-                               throw new NotImplementedException ();
-                       }
 
-                       protected override void OnRowUpdated (RowUpdatedEventArgs value)
-                       {
-                               throw new NotImplementedException ();
-                       }
-
-                       protected override void OnRowUpdating (RowUpdatingEventArgs value)
-                       {
-                               throw new NotImplementedException ();
-                       }
-#endif
-
-#if NET_2_0
                        public new int AddToBatch (IDbCommand command)
                        {
                                return base.AddToBatch (command);
@@ -324,7 +301,6 @@ sqliteDataAdapter.Update (dataSet, "Primus");
                        {
                                base.TerminateBatching ();
                        }
-#endif
                }
        }
 }