You've already forked linux-packaging-mono
Imported Upstream version 3.12.0
Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
@@ -31,7 +31,7 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Test.System.Data.Common
|
||||
namespace MonoTests.System.Data.Common
|
||||
{
|
||||
internal class DbDataReaderMock : DbDataReader
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Test.System.Data.Common
|
||||
namespace MonoTests.System.Data.Common
|
||||
{
|
||||
[TestFixture]
|
||||
public class DbDataReaderTest
|
||||
|
||||
@@ -12,6 +12,8 @@ using System.Threading;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class BinarySerializationTest
|
||||
{
|
||||
@@ -751,3 +753,4 @@ public class BinarySerializationTest
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class ConstraintExceptionTest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Data;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DBConcurrencyExceptionTest
|
||||
|
||||
@@ -739,6 +739,21 @@ namespace MonoTests.System.Data
|
||||
Assert.AreEqual(true , dr.HasErrors , "DRW48");
|
||||
}
|
||||
|
||||
[Test] public void HasErrorsWithNullError()
|
||||
{
|
||||
DataTable dt = new DataTable("myTable");
|
||||
DataRow dr = dt.NewRow();
|
||||
|
||||
// HasErrors (default)
|
||||
Assert.AreEqual(false, dr.HasErrors, "DRW47.2");
|
||||
|
||||
dr.RowError = null;
|
||||
|
||||
// HasErrors (set/get)
|
||||
Assert.AreEqual(string.Empty , dr.RowError , "DRW48.2");
|
||||
Assert.AreEqual(false , dr.HasErrors , "DRW49.2");
|
||||
}
|
||||
|
||||
[Test] public void HasVersion_ByDataRowVersion()
|
||||
{
|
||||
DataTable t = new DataTable("atable");
|
||||
|
||||
@@ -1 +1 @@
|
||||
27df0f589849c36eb477a933314db4f1f253993c
|
||||
6e338558389714f5748b4d8369ab873ffd258984
|
||||
@@ -28,10 +28,12 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DataTableCollectionTest2
|
||||
{
|
||||
@@ -143,7 +145,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
counter = 0;
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.CollectionChanged+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanged);
|
||||
ds.Tables.CollectionChanged+=new CollectionChangeEventHandler(Tables_CollectionChanged);
|
||||
ds.Tables.Add();
|
||||
ds.Tables.Add();
|
||||
Assert.AreEqual(2, counter, "DTC15");
|
||||
@@ -153,7 +155,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(4, counter, "DTC16");
|
||||
}
|
||||
|
||||
private void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
|
||||
private void Tables_CollectionChanged(object sender, CollectionChangeEventArgs e)
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
@@ -163,7 +165,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
counter = 0;
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.CollectionChanging+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanging);
|
||||
ds.Tables.CollectionChanging+=new CollectionChangeEventHandler(Tables_CollectionChanging);
|
||||
ds.Tables.Add();
|
||||
ds.Tables.Add();
|
||||
Assert.AreEqual(2, counter, "DTC17");
|
||||
@@ -173,7 +175,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(4, counter, "DTC18");
|
||||
}
|
||||
|
||||
private void Tables_CollectionChanging(object sender, System.ComponentModel.CollectionChangeEventArgs e)
|
||||
private void Tables_CollectionChanging(object sender, CollectionChangeEventArgs e)
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
@@ -233,7 +235,7 @@ namespace MonoTests_System.Data
|
||||
ds.Tables.Add();
|
||||
int count=0;
|
||||
|
||||
System.Collections.IEnumerator myEnumerator = ds.Tables.GetEnumerator();
|
||||
IEnumerator myEnumerator = ds.Tables.GetEnumerator();
|
||||
|
||||
while (myEnumerator.MoveNext())
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ using MonoTests.System.Data.Utils;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest2
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Xml;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest3
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.IO;
|
||||
using System.Xml;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest4
|
||||
@@ -1600,7 +1600,7 @@ namespace Monotests_System.Data
|
||||
DataSet ds = new DataSet ();
|
||||
DataTable table = new DataTable ("ParentTable");
|
||||
XmlReadMode mode = XmlReadMode.Auto;
|
||||
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
|
||||
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
|
||||
ds.Tables.Add (table);
|
||||
|
||||
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
|
||||
@@ -1638,7 +1638,7 @@ namespace Monotests_System.Data
|
||||
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
|
||||
DataSet ds = new DataSet ();
|
||||
DataTable table = new DataTable ("Table1");
|
||||
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
|
||||
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
|
||||
ds.Tables.Add (table);
|
||||
|
||||
try {
|
||||
@@ -1852,7 +1852,7 @@ namespace Monotests_System.Data
|
||||
DataTable table = new DataTable ("DummyTable");
|
||||
//define the table schame partially with a column name which does not match with any
|
||||
//table columns in the diffgram
|
||||
table.Columns.Add (new DataColumn ("WrongColumnName", System.Type.GetType ("System.String")));
|
||||
table.Columns.Add (new DataColumn ("WrongColumnName", Type.GetType ("System.String")));
|
||||
|
||||
XmlReadMode mode = XmlReadMode.Auto;
|
||||
|
||||
@@ -2013,8 +2013,8 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table.DataSet.DataSetName, "#2");
|
||||
Assert.AreEqual (2, table.Columns.Count, "#3");
|
||||
Assert.AreEqual (2, table.Rows.Count, "#4");
|
||||
Assert.AreEqual (typeof (System.Int32), table.Columns [0].DataType, "#5");
|
||||
Assert.AreEqual (typeof (System.String), table.Columns [1].DataType, "#6");
|
||||
Assert.AreEqual (typeof (Int32), table.Columns [0].DataType, "#5");
|
||||
Assert.AreEqual (typeof (String), table.Columns [1].DataType, "#6");
|
||||
Assert.AreEqual (1, table.Constraints.Count, "#7");
|
||||
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#8");
|
||||
Assert.AreEqual (1, table.ChildRelations.Count, "#9");
|
||||
@@ -2027,9 +2027,9 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#14");
|
||||
Assert.AreEqual (3, table1.Columns.Count, "#15");
|
||||
Assert.AreEqual (4, table1.Rows.Count, "#16");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#17");
|
||||
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#18");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [2].DataType, "#19");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#17");
|
||||
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#18");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [2].DataType, "#19");
|
||||
Assert.AreEqual (2, table1.Constraints.Count, "#20");
|
||||
Assert.AreEqual (typeof (UniqueConstraint), table1.Constraints [0].GetType (), "#21");
|
||||
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [1].GetType (), "#22");
|
||||
@@ -2045,8 +2045,8 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#29");
|
||||
Assert.AreEqual (2, table1.Columns.Count, "#30");
|
||||
Assert.AreEqual (8, table1.Rows.Count, "#31");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#32");
|
||||
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#33");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#32");
|
||||
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#33");
|
||||
Assert.AreEqual (1, table1.Constraints.Count, "#34");
|
||||
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [0].GetType (), "#35");
|
||||
Assert.AreEqual (1, table1.ParentRelations.Count, "#36");
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Xml.Serialization;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest5
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DataViewTest2
|
||||
{
|
||||
@@ -41,7 +42,7 @@ namespace MonoTests_System.Data
|
||||
|
||||
class EventProperties //hold the event properties to be checked
|
||||
{
|
||||
public System.ComponentModel.ListChangedType lstType ;
|
||||
public ListChangedType lstType ;
|
||||
public int NewIndex;
|
||||
public int OldIndex;
|
||||
}
|
||||
@@ -508,7 +509,7 @@ namespace MonoTests_System.Data
|
||||
//create the dataview for the table
|
||||
DataView dv = new DataView(dt);
|
||||
|
||||
System.Collections.IEnumerator ienm = null;
|
||||
IEnumerator ienm = null;
|
||||
|
||||
// GetEnumerator != null
|
||||
ienm = dv.GetEnumerator();
|
||||
@@ -549,7 +550,7 @@ namespace MonoTests_System.Data
|
||||
DataView dv = new DataView(dt);
|
||||
|
||||
//add event handler
|
||||
dv.ListChanged +=new System.ComponentModel.ListChangedEventHandler(dv_ListChanged);
|
||||
dv.ListChanged +=new ListChangedEventHandler(dv_ListChanged);
|
||||
|
||||
// ----- Change Value ---------
|
||||
evProp = null;
|
||||
@@ -557,7 +558,7 @@ namespace MonoTests_System.Data
|
||||
dv[1]["String1"] = "something";
|
||||
Assert.AreEqual(true , evProp!=null , "DV58");
|
||||
// change value - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemChanged, evProp.lstType , "DV59");
|
||||
Assert.AreEqual(ListChangedType.ItemChanged, evProp.lstType , "DV59");
|
||||
// change value - NewIndex
|
||||
Assert.AreEqual(1, evProp.NewIndex, "DV60");
|
||||
// change value - OldIndex
|
||||
@@ -569,7 +570,7 @@ namespace MonoTests_System.Data
|
||||
dv.AddNew();
|
||||
Assert.AreEqual(true , evProp!=null , "DV62");
|
||||
// Add New - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemAdded , evProp.lstType , "DV63");
|
||||
Assert.AreEqual(ListChangedType.ItemAdded , evProp.lstType , "DV63");
|
||||
// Add New - NewIndex
|
||||
Assert.AreEqual(6, evProp.NewIndex, "DV64");
|
||||
// Add New - OldIndex
|
||||
@@ -581,7 +582,7 @@ namespace MonoTests_System.Data
|
||||
dv.Sort = "ParentId Desc";
|
||||
Assert.AreEqual(true , evProp!=null , "DV66");
|
||||
// sort - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV67");
|
||||
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV67");
|
||||
// sort - NewIndex
|
||||
Assert.AreEqual(-1, evProp.NewIndex, "DV68");
|
||||
// sort - OldIndex
|
||||
@@ -627,12 +628,12 @@ namespace MonoTests_System.Data
|
||||
|
||||
Assert.AreEqual(true , evProp != null , "DV168");
|
||||
// Clear DataTable - should emit ListChangedType.Reset
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV169");
|
||||
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV169");
|
||||
// Clear DataTable - should clear view count
|
||||
Assert.AreEqual(0, dt.DefaultView.Count , "DV169");
|
||||
}
|
||||
|
||||
private void dv_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
|
||||
private void dv_ListChanged(object sender, ListChangedEventArgs e)
|
||||
{
|
||||
evProp = new EventProperties();
|
||||
evProp.lstType = e.ListChangedType;
|
||||
@@ -646,7 +647,7 @@ namespace MonoTests_System.Data
|
||||
// this test also check DataView.Count property
|
||||
|
||||
DataRowView[] drvResult = null;
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
//create the source datatable
|
||||
DataTable dt = DataProvider.CreateChildDataTable();
|
||||
@@ -763,7 +764,7 @@ namespace MonoTests_System.Data
|
||||
*/
|
||||
|
||||
//DataRowView[] drvResult = null;
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
DataTable dt = DataProvider.CreateParentDataTable();
|
||||
|
||||
@@ -821,7 +822,7 @@ namespace MonoTests_System.Data
|
||||
private DataRow[] GetResultRows(DataTable dt,DataRowState State)
|
||||
{
|
||||
//get expected rows
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
DataRowVersion drVer = DataRowVersion.Current;
|
||||
|
||||
//From MSDN - The row the default version for the current DataRowState.
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DeletedRowInaccessibleExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DuplicateNameExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
//using GHTUtils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class EvaluateExceptionTest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using System;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class ForeignKeyConstraintTest2
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class InRowChangingEventExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class InvalidConstraintExceptionTest
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Data;
|
||||
using NUnit.Framework;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
class MissingPrimaryKeyExceptionTest
|
||||
@@ -57,4 +57,4 @@ namespace MonoTests_System.Data
|
||||
tbl.Rows.Contains("Something");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user