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

@@ -29,7 +29,6 @@
using System.Data.SqlClient;
using NUnit.Framework;
#if NET_2_0
namespace MonoTests.System.Data.SqlClient
{
[TestFixture]
@@ -54,4 +53,3 @@ namespace MonoTests.System.Data.SqlClient
}
}
}
#endif

View File

@@ -52,10 +52,8 @@ namespace MonoTests.System.Data.SqlClient {
Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");
Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");
Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");
#if NET_2_0
Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");
Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");
#endif
SqlClientPermission sp = (SqlClientPermission)a.CreatePermission ();
Assert.IsFalse (sp.IsUnrestricted (), "IsUnrestricted");
}
@@ -141,11 +139,7 @@ namespace MonoTests.System.Data.SqlClient {
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
#else
[ExpectedException (typeof (ArgumentException))]
#endif
public void KeyRestrictionBehavior_Invalid ()
{
SqlClientPermissionAttribute a = new SqlClientPermissionAttribute (SecurityAction.Assert);

View File

@@ -55,11 +55,7 @@ namespace MonoTests.System.Data.SqlClient {
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
#else
[ExpectedException (typeof (ArgumentException))]
#endif
public void PermissionState_Invalid ()
{
PermissionState ps = (PermissionState)Int32.MinValue;

View File

@@ -26,10 +26,8 @@
// SOFTWARE.
using System;
#if NET_2_0
using System.Data;
using System.Data.Common;
#endif
using System.Data.SqlClient;
using NUnit.Framework;
@@ -39,7 +37,6 @@ namespace MonoTests.System.Data.Odbc
[TestFixture]
public class SqlCommandBuilderTest
{
#if NET_2_0
[Test]
public void CatalogLocationTest ()
{
@@ -227,13 +224,11 @@ namespace MonoTests.System.Data.Odbc
Assert.AreEqual ("unquotedIdentifier", ex.ParamName, "#5");
}
}
#endif
[Test]
public void QuotePrefix ()
{
SqlCommandBuilder cb = new SqlCommandBuilder ();
#if NET_2_0
Assert.AreEqual ("[", cb.QuotePrefix, "#A1");
Assert.AreEqual ("]", cb.QuoteSuffix, "#A2");
cb.QuotePrefix = "\"";
@@ -242,31 +237,8 @@ namespace MonoTests.System.Data.Odbc
cb.QuotePrefix = "[";
Assert.AreEqual ("[", cb.QuotePrefix, "#C1");
Assert.AreEqual ("]", cb.QuoteSuffix, "#C2");
#else
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#A1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#A2");
cb.QuotePrefix = "\"";
Assert.AreEqual ("\"", cb.QuotePrefix, "#B1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#B2");
cb.QuotePrefix = string.Empty;
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#C1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#C2");
cb.QuotePrefix = "x";
Assert.AreEqual ("x", cb.QuotePrefix, "#D1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#D2");
cb.QuotePrefix = null;
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#E1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#E2");
cb.QuotePrefix = "mono";
Assert.AreEqual ("mono", cb.QuotePrefix, "#F1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#F2");
cb.QuotePrefix = " ";
Assert.AreEqual (" ", cb.QuotePrefix, "#G1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#G2");
#endif
}
#if NET_2_0
[Test]
public void QuotePrefix_Value_Invalid ()
{
@@ -294,13 +266,11 @@ namespace MonoTests.System.Data.Odbc
}
}
}
#endif
[Test]
public void QuoteSuffix ()
{
SqlCommandBuilder cb = new SqlCommandBuilder ();
#if NET_2_0
Assert.AreEqual ("[", cb.QuotePrefix, "#A1");
Assert.AreEqual ("]", cb.QuoteSuffix, "#A2");
cb.QuoteSuffix = "\"";
@@ -309,31 +279,8 @@ namespace MonoTests.System.Data.Odbc
cb.QuoteSuffix = "]";
Assert.AreEqual ("[", cb.QuotePrefix, "#C1");
Assert.AreEqual ("]", cb.QuoteSuffix, "#C2");
#else
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#A1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#A2");
cb.QuoteSuffix = "\"";
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#B1");
Assert.AreEqual ("\"", cb.QuoteSuffix, "#B2");
cb.QuoteSuffix = string.Empty;
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#C1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#C2");
cb.QuoteSuffix = "x";
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#D1");
Assert.AreEqual ("x", cb.QuoteSuffix, "#D2");
cb.QuoteSuffix = null;
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#E1");
Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#E2");
cb.QuoteSuffix = "mono";
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#F1");
Assert.AreEqual ("mono", cb.QuoteSuffix, "#F2");
cb.QuoteSuffix = " ";
Assert.AreEqual (string.Empty, cb.QuotePrefix, "#G1");
Assert.AreEqual (" ", cb.QuoteSuffix, "#G2");
#endif
}
#if NET_2_0
[Test]
public void QuoteSuffix_Value_Invalid ()
{
@@ -399,6 +346,5 @@ namespace MonoTests.System.Data.Odbc
}
}
}
#endif
}
}

View File

@@ -29,9 +29,7 @@
using System;
using System.Data;
#if NET_2_0
using System.Data.Sql;
#endif
using System.Data.SqlClient;
using NUnit.Framework;
@@ -53,10 +51,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#4");
Assert.IsNull (cmd.Container, "#5");
Assert.IsTrue (cmd.DesignTimeVisible, "#6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#8");
#endif
Assert.IsNotNull (cmd.Parameters, "#9");
Assert.AreEqual (0, cmd.Parameters.Count, "#10");
Assert.IsNull (cmd.Site, "#11");
@@ -74,10 +70,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#A4");
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
#endif
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -91,10 +85,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#B4");
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
#endif
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -115,10 +107,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreSame (conn, cmd.Connection, "#A4");
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
#endif
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -132,10 +122,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreSame (conn, cmd.Connection, "#B4");
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
#endif
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -149,10 +137,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#C4");
Assert.IsNull (cmd.Container, "#C5");
Assert.IsTrue (cmd.DesignTimeVisible, "#C6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#C7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
#endif
Assert.IsNotNull (cmd.Parameters, "#C9");
Assert.AreEqual (0, cmd.Parameters.Count, "#C10");
Assert.IsNull (cmd.Site, "#C11");
@@ -173,10 +159,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreSame (conn, cmd.Connection, "#A4");
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
#endif
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -190,10 +174,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreSame (conn, cmd.Connection, "#B4");
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
#endif
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -207,10 +189,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#C4");
Assert.IsNull (cmd.Container, "#C5");
Assert.IsTrue (cmd.DesignTimeVisible, "#C6");
#if NET_2_0
Assert.IsNull (cmd.Notification, "#C7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
#endif
Assert.IsNotNull (cmd.Parameters, "#C9");
Assert.AreEqual (0, cmd.Parameters.Count, "#C10");
Assert.IsNull (cmd.Site, "#C11");
@@ -221,26 +201,18 @@ namespace MonoTests.System.Data.SqlClient
[Test]
public void Clone ()
{
#if NET_2_0
SqlNotificationRequest notificationReq = new SqlNotificationRequest ();
#endif
SqlCommand cmd = new SqlCommand ();
cmd.CommandText = "sp_insert";
cmd.CommandTimeout = 100;
cmd.CommandType = CommandType.StoredProcedure;
cmd.DesignTimeVisible = false;
#if NET_2_0
cmd.Notification = notificationReq;
cmd.NotificationAutoEnlist = false;
#endif
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
cmd.Parameters ["@TestPar1"].Value = DBNull.Value;
#if NET_2_0
cmd.Parameters.AddWithValue ("@BirthDate", DateTime.Now);
#else
cmd.Parameters.Add ("@BirthDate", DateTime.Now);
#endif
cmd.UpdatedRowSource = UpdateRowSource.OutputParameters;
SqlCommand clone = (((ICloneable) (cmd)).Clone ()) as SqlCommand;
@@ -249,17 +221,11 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreEqual (CommandType.StoredProcedure, clone.CommandType, "#3");
Assert.IsNull (cmd.Connection, "#4");
Assert.IsFalse (cmd.DesignTimeVisible, "#5");
#if NET_2_0
Assert.AreSame (notificationReq, cmd.Notification, "#6");
Assert.IsFalse (cmd.NotificationAutoEnlist, "#7");
#endif
Assert.AreEqual (2, clone.Parameters.Count, "#8");
Assert.AreEqual (100, clone.CommandTimeout, "#9");
#if NET_2_0
clone.Parameters.AddWithValue ("@test", DateTime.Now);
#else
clone.Parameters.Add ("@test", DateTime.Now);
#endif
clone.Parameters [0].ParameterName = "@ClonePar1";
Assert.AreEqual (3, clone.Parameters.Count, "#10");
Assert.AreEqual (2, cmd.Parameters.Count, "#11");
@@ -308,11 +274,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
#if NET_2_0
Assert.AreEqual ("CommandTimeout", ex.ParamName, "#5");
#else
Assert.IsNull (ex.ParamName, "#5");
#endif
}
}
@@ -323,7 +285,6 @@ namespace MonoTests.System.Data.SqlClient
try {
cmd.CommandType = (CommandType) (666);
Assert.Fail ("#1");
#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// The CommandType enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
@@ -332,16 +293,6 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5");
Assert.AreEqual ("CommandType", ex.ParamName, "#6");
}
#else
} catch (ArgumentException ex) {
// The CommandType 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 ("666") != -1, "#5");
Assert.IsNull (ex.ParamName, "#6");
}
#endif
}
[Test] // bug #324386
@@ -451,11 +402,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
#if NET_2_0
Assert.IsTrue (ex.Message.IndexOf ("ExecuteScalar") != -1, "#5");
#else
Assert.IsTrue (ex.Message.IndexOf ("ExecuteReader") != -1, "#5");
#endif
}
}
@@ -472,11 +419,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
#if NET_2_0
Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar:"), "#5");
#else
Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader:"), "#5");
#endif
}
}
@@ -487,15 +430,11 @@ namespace MonoTests.System.Data.SqlClient
// Text, without parameters
cmd = new SqlCommand ("select count(*) from whatever");
#if NET_2_0
try {
cmd.Prepare ();
Assert.Fail ("#A1");
} catch (NullReferenceException) {
}
#else
cmd.Prepare ();
#endif
// Text, with parameters
cmd = new SqlCommand ("select count(*) from whatever");
@@ -503,59 +442,37 @@ namespace MonoTests.System.Data.SqlClient
try {
cmd.Prepare ();
Assert.Fail ("#B1");
#if NET_2_0
} catch (NullReferenceException) {
}
#else
} catch (InvalidOperationException ex) {
// Prepare: Connection property has not been
// initialized
Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
Assert.IsNotNull (ex.Message, "#B4");
}
#endif
// Text, without parameters
cmd = new SqlCommand ("select count(*) from whatever");
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
cmd.Parameters.Clear ();
#if NET_2_0
try {
cmd.Prepare ();
Assert.Fail ("#C1");
} catch (NullReferenceException) {
}
#else
cmd.Prepare ();
#endif
// StoredProcedure, without parameters
cmd = new SqlCommand ("FindCustomer");
cmd.CommandType = CommandType.StoredProcedure;
#if NET_2_0
try {
cmd.Prepare ();
Assert.Fail ("#D1");
} catch (NullReferenceException) {
}
#else
cmd.Prepare ();
#endif
// StoredProcedure, with parameters
cmd = new SqlCommand ("FindCustomer");
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
#if NET_2_0
try {
cmd.Prepare ();
Assert.Fail ("#E1");
} catch (NullReferenceException) {
}
#else
cmd.Prepare ();
#endif
}
[Test] // bug #412586
@@ -635,7 +552,6 @@ namespace MonoTests.System.Data.SqlClient
try {
cmd.UpdatedRowSource = (UpdateRowSource) 666;
Assert.Fail ("#1");
#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// The UpdateRowSource enumeration value,666,
// is invalid
@@ -644,27 +560,15 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNotNull (ex.Message, "#4");
Assert.AreEqual ("UpdateRowSource", ex.ParamName, "#5");
}
#else
} catch (ArgumentException ex) {
// The UpdateRowSource enumeration value, 666,
// is invalid
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNull (ex.ParamName, "#5");
}
#endif
}
#if NET_2_0
[Test] // bug #381100
public void ParameterCollectionTest ()
{
SqlCommand cmd = new SqlCommand();
cmd.Parameters.AddRange(new SqlParameter[] { });
}
#endif
}
}

View File

@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
#region Using directives
@@ -126,4 +125,3 @@ namespace MonoTests.System.Data.Common
}
}
#endif // NET_2_0

View File

@@ -45,28 +45,20 @@ namespace MonoTests.System.Data.SqlClient
{
SqlDataAdapter da = new SqlDataAdapter ();
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNull (da.SelectCommand, "#11");
Assert.IsNull (da.Site, "#12");
Assert.IsNotNull (da.TableMappings, "#13");
Assert.AreEqual (0, da.TableMappings.Count, "#14");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#15");
#endif
Assert.IsNull (da.UpdateCommand, "#16");
}
@@ -76,29 +68,21 @@ namespace MonoTests.System.Data.SqlClient
SqlCommand cmd = new SqlCommand ();
SqlDataAdapter da = new SqlDataAdapter (cmd);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.AreSame (cmd, da.SelectCommand, "#12");
Assert.IsNull (da.Site, "#13");
Assert.IsNotNull (da.TableMappings, "#14");
Assert.AreEqual (0, da.TableMappings.Count, "#15");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#16");
#endif
Assert.IsNull (da.UpdateCommand, "#17");
}
@@ -107,28 +91,20 @@ namespace MonoTests.System.Data.SqlClient
{
SqlDataAdapter da = new SqlDataAdapter ((SqlCommand) null);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNull (da.SelectCommand, "#11");
Assert.IsNull (da.Site, "#12");
Assert.IsNotNull (da.TableMappings, "#13");
Assert.AreEqual (0, da.TableMappings.Count, "#14");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#15");
#endif
Assert.IsNull (da.UpdateCommand, "#16");
}
@@ -141,30 +117,22 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter (selectCommandText,
selectConnection);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12");
Assert.AreSame (selectConnection, da.SelectCommand.Connection, "#13");
Assert.IsNull (da.Site, "#14");
Assert.IsNotNull (da.TableMappings, "#15");
Assert.AreEqual (0, da.TableMappings.Count, "#16");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#17");
#endif
Assert.IsNull (da.UpdateCommand, "#18");
}
@@ -176,21 +144,15 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter ((string) null,
selectConnection);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.IsNotNull (da.SelectCommand.CommandText, "#12");
Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13");
@@ -198,9 +160,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (da.Site, "#15");
Assert.IsNotNull (da.TableMappings, "#16");
Assert.AreEqual (0, da.TableMappings.Count, "#17");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#18");
#endif
Assert.IsNull (da.UpdateCommand, "#19");
}
@@ -212,30 +172,22 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter (selectCommandText,
(SqlConnection) null);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12");
Assert.IsNull (da.SelectCommand.Connection, "#13");
Assert.IsNull (da.Site, "#14");
Assert.IsNotNull (da.TableMappings, "#15");
Assert.AreEqual (0, da.TableMappings.Count, "#16");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#17");
#endif
Assert.IsNull (da.UpdateCommand, "#18");
}
@@ -248,21 +200,15 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter (selectCommandText,
selectConnectionString);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12");
Assert.IsNotNull (da.SelectCommand.Connection, "#13");
@@ -270,9 +216,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (da.Site, "#15");
Assert.IsNotNull (da.TableMappings, "#16");
Assert.AreEqual (0, da.TableMappings.Count, "#17");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#18");
#endif
Assert.IsNull (da.UpdateCommand, "#19");
}
@@ -284,21 +228,15 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter ((string) null,
selectConnectionString);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.IsNotNull (da.SelectCommand.CommandText, "#12");
Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13");
@@ -307,9 +245,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (da.Site, "#16");
Assert.IsNotNull (da.TableMappings, "#17");
Assert.AreEqual (0, da.TableMappings.Count, "#18");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#19");
#endif
Assert.IsNull (da.UpdateCommand, "#20");
}
@@ -321,21 +257,15 @@ namespace MonoTests.System.Data.SqlClient
SqlDataAdapter da = new SqlDataAdapter (selectCommandText,
(string) null);
Assert.IsTrue (da.AcceptChangesDuringFill, "#1");
#if NET_2_0
Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2");
#endif
Assert.IsNull (da.Container, "#3");
Assert.IsFalse (da.ContinueUpdateOnError, "#4");
Assert.IsNull (da.DeleteCommand, "#5");
#if NET_2_0
Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6");
#endif
Assert.IsNull (da.InsertCommand, "#7");
Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8");
Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9");
#if NET_2_0
Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10");
#endif
Assert.IsNotNull (da.SelectCommand, "#11");
Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12");
Assert.IsNotNull (da.SelectCommand.Connection, "#14");
@@ -343,9 +273,7 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (da.Site, "#16");
Assert.IsNotNull (da.TableMappings, "#17");
Assert.AreEqual (0, da.TableMappings.Count, "#18");
#if NET_2_0
Assert.AreEqual (1, da.UpdateBatchSize, "#19");
#endif
Assert.IsNull (da.UpdateCommand, "#20");
}