Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -55,7 +55,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#5");
Assert.IsTrue (cmd.DesignTimeVisible, "#6");
Assert.IsNull (cmd.Notification, "#7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#8");
// Not implemented in corefx:
//Assert.IsTrue (cmd.NotificationAutoEnlist, "#8");
Assert.IsNotNull (cmd.Parameters, "#9");
Assert.AreEqual (0, cmd.Parameters.Count, "#10");
Assert.IsNull (cmd.Site, "#11");
@@ -77,7 +78,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -92,7 +94,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -117,7 +120,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -132,7 +136,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
// Not implemented in corefx:
//Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -147,7 +152,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#C5");
Assert.IsTrue (cmd.DesignTimeVisible, "#C6");
Assert.IsNull (cmd.Notification, "#C7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
// Not implemented in corefx:
//Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
Assert.IsNotNull (cmd.Parameters, "#C9");
Assert.AreEqual (0, cmd.Parameters.Count, "#C10");
Assert.IsNull (cmd.Site, "#C11");
@@ -172,7 +178,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#A5");
Assert.IsTrue (cmd.DesignTimeVisible, "#A6");
Assert.IsNull (cmd.Notification, "#A7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8");
Assert.IsNotNull (cmd.Parameters, "#A9");
Assert.AreEqual (0, cmd.Parameters.Count, "#A10");
Assert.IsNull (cmd.Site, "#A11");
@@ -187,7 +194,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#B5");
Assert.IsTrue (cmd.DesignTimeVisible, "#B6");
Assert.IsNull (cmd.Notification, "#B7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8");
Assert.IsNotNull (cmd.Parameters, "#B9");
Assert.AreEqual (0, cmd.Parameters.Count, "#B10");
Assert.IsNull (cmd.Site, "#B11");
@@ -202,7 +210,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#C5");
Assert.IsTrue (cmd.DesignTimeVisible, "#C6");
Assert.IsNull (cmd.Notification, "#C7");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
// Not implemented in corefx:
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8");
Assert.IsNotNull (cmd.Parameters, "#C9");
Assert.AreEqual (0, cmd.Parameters.Count, "#C10");
Assert.IsNull (cmd.Site, "#C11");
@@ -224,7 +233,8 @@ namespace MonoTests.System.Data.SqlClient
cmd.CommandType = CommandType.StoredProcedure;
cmd.DesignTimeVisible = false;
cmd.Notification = notificationReq;
cmd.NotificationAutoEnlist = false;
// not implemented in corefx
//cmd.NotificationAutoEnlist = false;
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
cmd.Parameters ["@TestPar1"].Value = DBNull.Value;
cmd.Parameters.AddWithValue ("@BirthDate", DateTime.Now);
@@ -237,7 +247,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Connection, "#4");
Assert.IsFalse (cmd.DesignTimeVisible, "#5");
Assert.AreSame (notificationReq, cmd.Notification, "#6");
Assert.IsFalse (cmd.NotificationAutoEnlist, "#7");
// not implemented in corefx
//Assert.IsFalse (cmd.NotificationAutoEnlist, "#7");
Assert.AreEqual (2, clone.Parameters.Count, "#8");
Assert.AreEqual (100, clone.CommandTimeout, "#9");
clone.Parameters.AddWithValue ("@test", DateTime.Now);
@@ -480,50 +491,13 @@ namespace MonoTests.System.Data.SqlClient
{
SqlCommand cmd;
// Text, without parameters
cmd = new SqlCommand ("select count(*) from whatever");
try {
cmd.Prepare ();
Assert.Fail ("#A1");
} catch (NullReferenceException) {
}
// Text, with parameters
cmd = new SqlCommand ("select count(*) from whatever");
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
try {
cmd.Prepare ();
Assert.Fail ("#B1");
} catch (NullReferenceException) {
}
// Text, without parameters
cmd = new SqlCommand ("select count(*) from whatever");
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
cmd.Parameters.Clear ();
try {
cmd.Prepare ();
Assert.Fail ("#C1");
} catch (NullReferenceException) {
}
// StoredProcedure, without parameters
cmd = new SqlCommand ("FindCustomer");
cmd.CommandType = CommandType.StoredProcedure;
try {
cmd.Prepare ();
Assert.Fail ("#D1");
} catch (NullReferenceException) {
}
// StoredProcedure, with parameters
cmd = new SqlCommand ("FindCustomer");
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
try {
cmd.Prepare ();
Assert.Fail ("#E1");
} catch (NullReferenceException) {
} catch (InvalidOperationException) {
}
}

View File

@@ -64,6 +64,7 @@ namespace MonoTests.System.Data.Common
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
public void PropertiesTest ()
{
builder = new SqlConnectionStringBuilder ("SERVER=localhost;");
@@ -75,6 +76,7 @@ namespace MonoTests.System.Data.Common
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
public void ItemTest ()
{
builder = new SqlConnectionStringBuilder ("SERVER=localhost;");
@@ -102,6 +104,7 @@ namespace MonoTests.System.Data.Common
}
[Test, ExpectedException (typeof (ArgumentException))]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
public void InvalidKeyTest ()
{
builder = new SqlConnectionStringBuilder ("SERVER=localhost;Network=DBMSSOCN");
@@ -110,6 +113,7 @@ namespace MonoTests.System.Data.Common
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
public void RemoveTest ()
{
builder = new SqlConnectionStringBuilder ("SERVER = localhost ;Network=DBMSSOCN");

View File

@@ -56,7 +56,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cn.Site, "#8");
Assert.AreEqual (ConnectionState.Closed, cn.State, "#9");
Assert.IsFalse (cn.StatisticsEnabled, "#10");
Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#11");
// https://github.com/dotnet/corefx/issues/22871
//Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#11");
}
[Test] // SqlConnection (string)
@@ -78,7 +79,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cn.Site, "#A8");
Assert.AreEqual (ConnectionState.Closed, cn.State, "#A9");
Assert.IsFalse (cn.StatisticsEnabled, "#A10");
Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#A11");
// https://github.com/dotnet/corefx/issues/22871
//Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#A11");
cn = new SqlConnection ((string) null);
Assert.AreEqual (string.Empty, cn.ConnectionString, "#B1");
@@ -91,7 +93,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cn.Site, "#B8");
Assert.AreEqual (ConnectionState.Closed, cn.State, "#B9");
Assert.IsFalse (cn.StatisticsEnabled, "#B10");
Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#B11");
// https://github.com/dotnet/corefx/issues/22871
//Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#B11");
}
[Test]
@@ -279,6 +282,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/11958
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -297,6 +301,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/11958
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -333,6 +338,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/11958
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -355,6 +361,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/11958
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -457,7 +464,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.IsNull (cmd.Container, "#6");
Assert.IsTrue (cmd.DesignTimeVisible, "#7");
Assert.IsNull (cmd.Notification, "#8");
Assert.IsTrue (cmd.NotificationAutoEnlist, "#9");
// not implemented in corefx yet
// Assert.IsTrue (cmd.NotificationAutoEnlist, "#9");
Assert.IsNotNull (cmd.Parameters, "#10");
Assert.AreEqual (0, cmd.Parameters.Count, "#11");
Assert.IsNull (cmd.Site, "#12");
@@ -479,7 +487,8 @@ namespace MonoTests.System.Data.SqlClient
Assert.AreEqual (string.Empty, cn.Database, "#3");
Assert.AreEqual (string.Empty, cn.DataSource, "#4");
Assert.AreEqual (8000, cn.PacketSize, "#5");
Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#6");
// https://github.com/dotnet/corefx/issues/22871
// Assert.IsTrue (string.Compare (Environment.MachineName, cn.WorkstationId, true) == 0, "#6");
Assert.AreEqual (ConnectionState.Closed, cn.State, "#7");
cn.Dispose ();
@@ -488,6 +497,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] //https://github.com/dotnet/corefx/issues/22882
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -567,6 +577,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -578,6 +589,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22879
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -904,6 +916,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -916,6 +929,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22879
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -1055,6 +1069,7 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
[Category("NotWorking")] // https://github.com/dotnet/corefx/issues/22474
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif

View File

@@ -41,6 +41,9 @@ namespace MonoTests.System.Data.SqlClient
public class SqlDataAdapterTest
{
[Test] // SqlDataAdapter ()
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor1 ()
{
SqlDataAdapter da = new SqlDataAdapter ();
@@ -90,6 +93,9 @@ namespace MonoTests.System.Data.SqlClient
}
[Test] // SqlDataAdapter (SqlCommand)
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor2_SelectCommand_Null ()
{
SqlDataAdapter da = new SqlDataAdapter ((SqlCommand) null);
@@ -374,6 +380,9 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void UpdateBatchSize ()
{
SqlDataAdapter da = new SqlDataAdapter ();
@@ -386,6 +395,9 @@ namespace MonoTests.System.Data.SqlClient
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void UpdateBatchSize_Negative ()
{
SqlDataAdapter da = new SqlDataAdapter ();