Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -51,7 +51,6 @@ namespace MonoTests.System.Data.Common
Assert.IsTrue (da.AcceptChangesDuringFill, "#3");
}
#if NET_2_0
[Test]
public void AcceptChangesDuringUpdate ()
{
@ -63,7 +62,6 @@ namespace MonoTests.System.Data.Common
da.AcceptChangesDuringUpdate = true;
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#3");
}
#endif
[Test]
public void ContinueUpdateOnError ()
@ -77,7 +75,6 @@ namespace MonoTests.System.Data.Common
Assert.IsTrue (da.ContinueUpdateOnError, "#3");
}
#if NET_2_0
[Test]
public void Fill_Direct ()
{
@ -124,7 +121,6 @@ namespace MonoTests.System.Data.Common
Assert.AreEqual ("LoadOption", ex.ParamName, "#8");
}
}
#endif
[Test]
public void MissingMappingAction_Valid ()
@ -145,7 +141,6 @@ namespace MonoTests.System.Data.Common
try {
da.MissingMappingAction = (MissingMappingAction) 666;
Assert.Fail ("#1");
#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// The MissingMappingAction enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
@ -156,17 +151,6 @@ namespace MonoTests.System.Data.Common
Assert.IsNotNull (ex.ParamName, "#7");
Assert.AreEqual ("MissingMappingAction", ex.ParamName, "#8");
}
#else
} catch (ArgumentException ex) {
// The MissingMappingAction enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsTrue (ex.Message.IndexOf ("MissingMappingAction") != -1, "#5");
Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6");
Assert.IsNull (ex.ParamName, "#7");
}
#endif
}
[Test]
@ -188,7 +172,6 @@ namespace MonoTests.System.Data.Common
try {
da.MissingSchemaAction = (MissingSchemaAction) 666;
Assert.Fail ("#1");
#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// The MissingSchemaAction enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
@ -199,20 +182,8 @@ namespace MonoTests.System.Data.Common
Assert.IsNotNull (ex.ParamName, "#7");
Assert.AreEqual ("MissingSchemaAction", ex.ParamName, "#8");
}
#else
} catch (ArgumentException ex) {
// The MissingSchemaAction enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsTrue (ex.Message.IndexOf ("MissingSchemaAction") != -1, "#5");
Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6");
Assert.IsNull (ex.ParamName, "#7");
}
#endif
}
#if NET_2_0
[Test]
public void ReturnProviderSpecificTypes ()
{
@ -224,31 +195,9 @@ namespace MonoTests.System.Data.Common
da.ReturnProviderSpecificTypes = true;
Assert.IsTrue (da.ReturnProviderSpecificTypes, "#3");
}
#endif
}
class MyAdapter : DataAdapter
{
#if ONLY_1_1
public override int Fill (DataSet dataSet)
{
throw new NotImplementedException ();
}
public override DataTable[] FillSchema (DataSet dataSet, SchemaType schemaType)
{
throw new NotImplementedException ();
}
public override IDataParameter[] GetFillParameters ()
{
throw new NotImplementedException ();
}
public override int Update (DataSet dataSet)
{
throw new NotImplementedException ();
}
#endif
}
}