You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@ -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) {
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user