DataTable table = new DataTable ();
table.Columns.Add ("Col_0.Value", Type.GetType ("System.Int32"));
table.Columns.Add ("Col_1", Type.GetType ("System.Int32"));
- table.Columns.Add ("Result", Type.GetType ("System.Int32"), "IIF(Col_0.Value, Col_1 + 5, 0)");
+ table.Columns.Add ("Result", Type.GetType ("System.Int32"), "IIF(Col_0.Value <> 0, Col_1 + 5, 0)");
DataRow row = table.NewRow ();
row ["Col_0.Value"] = 0;
dt.Rows.Add (new string [] { null });
dt.Rows.Add (new string [] { "xax" });
dt.Columns.Add ("c2", typeof (bool), "c1 LIKE '%a%'");
- Assert.IsFalse ((bool) dt.Rows [0] [1]);
+ //Assert.IsFalse ((bool) dt.Rows [0] [1]); ... cannot cast from DBNull to bool.
Assert.IsTrue ((bool) dt.Rows [1] [1]);
}
Assert.AreEqual (OdbcType.Int, param.OdbcType, "#2");
param = new OdbcParameter ("test", 10);
- Assert.AreEqual (OdbcType.Int, param.OdbcType, "#3");
+ Assert.AreEqual (OdbcType.NVarChar, param.OdbcType, "#3");
param.OdbcType = OdbcType.Real;
Assert.AreEqual (OdbcType.Real, param.OdbcType, "#4");
Assert.AreEqual (10, param.Value, "#5");
public class OleDbParameterCollectionTest {
[Test]
+ [Category ("NotWorking")] // it tries to PInvoke LocalAlloc() and fails on non-Windows.
public void AddWithValueTest ()
{
OleDbCommand command = new OleDbCommand();
// Text, without parameters
cmd = new SqlCommand ("select count(*) from whatever");
- try {
- cmd.Prepare ();
- Assert.Fail ("#A1");
- } catch (NullReferenceException) {
- }
+ cmd.Prepare ();
// Text, with parameters
cmd = new SqlCommand ("select count(*) from whatever");
cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
try {
cmd.Prepare ();
- Assert.Fail ("#B1");
- } catch (NullReferenceException) {
+ } catch (InvalidOperationException) {
}
// 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) {
- }
+ cmd.Prepare ();
// StoredProcedure, without parameters
cmd = new SqlCommand ("FindCustomer");
cmd.CommandType = CommandType.StoredProcedure;
- try {
- cmd.Prepare ();
- Assert.Fail ("#D1");
- } catch (NullReferenceException) {
- }
+ cmd.Prepare ();
// 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) {
- }
+ cmd.Prepare ();
}
[Test] // bug #412586
}
[Test]
- [Category ("NotDotNet")]
- // Even after EndInit(), MS.NET does not fill Table property
- // on UniqueConstraint.
+ [Ignore ("Even after EndInit(), .NET does not fill Table property on UniqueConstraint.")]
public void TestAddRange2 ()
{
DataTable table = new DataTable ("Table");
// After EndInit is called the constraints associated with most recent call to AddRange() must be
// added to the ConstraintCollection
+ /* dunno if the above is true, but it crashes on .NET either. Disabling.
Assert.That (constraints [2].Table.ToString (), Is.EqualTo ("Table"), "#A03");
Assert.That (table.Constraints.Contains ("Unique1"), Is.True, "#A04");
Assert.That (table.Constraints.Contains ("Unique3"), Is.True, "#A06");
Assert.That (table.Constraints.Contains ("Unique2"), Is.True, "#A05");
+ */
}
[Test]
dc.MaxLength = int.MinValue ;
//Checking Get MinValue
// MaxLength MinValue
- Assert.AreEqual(int.MinValue, dc.MaxLength , "DC31");
+ Assert.AreEqual(-1, dc.MaxLength , "DC31");
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("col",typeof(string)));
//check that the DataRowView has a new DataView
// check that the DataRowView has a new DataView
dv = new DataView();
- Assert.AreEqual(false, drv1.DataView.Equals(dv) , "DRV21");
+ Assert.AreEqual(true, drv1.DataView.Equals(dv) , "DRV21");
}
[Test] public void Delete()
dv.RowStateFilter=DataViewRowState.Deleted ;
// check Original
- Assert.AreEqual(DataRowVersion.Original , drv.RowVersion, "DRV47");
+ Assert.AreEqual(DataRowVersion.Current , drv.RowVersion, "DRV47");
}
}
}
// namespaces
ds = GetDataSet (xml14, null);
AssertDataSet ("xml14", ds, "root", 0, 0);
- Assert.AreEqual ("p", ds.Prefix);
+ Assert.AreEqual (string.Empty, ds.Prefix);
Assert.AreEqual ("urn:foo", ds.Namespace);
ds = GetDataSet (xml17, null);
}
[Test]
- [Category ("NotDotNet")]
- // MS.NET has a bug on handling default value of referenced
- // attribute.
+ [Ignore (".NET has a bug on handling default value of referenced attribute.")]
public void TestSampleFileValueConstraints ()
{
DataSet ds = new DataSet ();
\r
AssertReadXml (ds, "SimpleTable", xml6,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
- "root", 1); // not NewDataSet unlike standalone load\r
+ "NewDataSet", 1);\r
AssertDataTable ("seq1", ds.Tables [0], "root", 1, 1, 0, 0, 0, 0);\r
}\r
\r
\r
AssertReadXml (ds, "SimpleTable2", xml7,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
- "root", 1); // dataset name will not be overwritten\r
+ "NewDataSet", 1);\r
AssertDataTable ("#1", ds.Tables [0], "root", 2, 1, 0, 0, 0, 0);\r
\r
// simple table -> simple dataset\r
substring = TextString.Substring (0, TextString.IndexOf(EOL));
TextString = TextString.Substring (TextString.IndexOf(EOL) + EOL.Length);
// This is original DataSet.WriteXmlSchema() output
-#if MOBILE
- Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16");
-#elif NET_4_0
- Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16");
-#else
- Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16");
-#endif
- if (substring.IndexOf ("<xs:element") < 0)
- Assert.Fail ("test#16: " + substring);
- if (substring.IndexOf ("name=\"second\"") < 0)
- Assert.Fail ("test#16: " + substring);
- if (substring.IndexOf ("msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=") < 0)
- Assert.Fail ("test#16: " + substring);
- if (substring.IndexOf ("type=\"xs:string\"") < 0)
- Assert.Fail ("test#16: " + substring);
- if (substring.IndexOf ("minOccurs=\"0\"") < 0)
- Assert.Fail ("test#16: " + substring);
+ Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid\" name=\"second\" type=\"xs:string\" />", substring, "test#16");
substring = TextString.Substring (0, TextString.IndexOf(EOL));
TextString = TextString.Substring (TextString.IndexOf(EOL) + EOL.Length);
using NUnit.Framework;
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableLoadRowTest
dt.LoadDataRow (new object [] { 2, null, "mono test" }, LoadOption.OverwriteChanges);
Assert.AreEqual (3, dt.Rows.Count, "#1 should not have added a row");
- Assert.AreEqual (20, dt.Rows [1] [1], "#2 should be default value");
- Assert.AreEqual (20, dt.Rows [1] [1, DataRowVersion.Original], "#3 should be default value");
+ Assert.AreEqual (25, dt.Rows [1] [1], "#2 should be default value");
+ Assert.AreEqual (25, dt.Rows [1] [1, DataRowVersion.Original], "#3 should be default value");
}
// Get by name
Assert.AreEqual (1, (int) reader ["id"], "#1 should be able to get by name");
Assert.AreEqual (333, reader.GetInt32 (ordinal), "#2 should get int32");
- Assert.AreEqual ("System.Int32", reader.GetDataTypeName (ordinal), "#3 data type should match");
+ Assert.AreEqual ("Int32", reader.GetDataTypeName (ordinal), "#3 data type should match");
} finally {
if (reader != null && !reader.IsClosed)
reader.Close ();
dt.Rows.Add (new object [] {"\t"});
dt.Rows.Add (new object [] {"\\"});
- Assert.AreEqual (1, dt.Select (@"SomeCol='\t'").Length, "test#01");
- Assert.AreEqual (1, dt.Select (@"SomeCol='\\'").Length, "test#02");
+ Assert.AreEqual (0, dt.Select (@"SomeCol='\t'").Length, "test#01");
+ Assert.AreEqual (0, dt.Select (@"SomeCol='\\'").Length, "test#02");
- try {
- dt.Select (@"SomeCol='\x'");
- Assert.Fail ("test#03");
- } catch (SyntaxErrorException) {
- }
+ Assert.AreEqual (0, dt.Select (@"SomeCol='\x'").Length, "test#03");
}
[Test]
}
[Test]
+ [ExpectedException (typeof (ArgumentException))]
public void ColumnObjectTypeTest() {
DataTable dt = new DataTable();
dt.Columns.Add("Series Label", typeof(SqlInt32));
dt.Rows.Add(new object[] {"sss"});
- Assert.AreEqual (1, dt.Rows.Count);
}
private bool tableInitialized;
tableInitialized = false;
dt.Initialized += new EventHandler (OnTableInitialized);
dt.Columns.Add("Series Label", typeof(SqlInt32));
- dt.Rows.Add(new object[] {"sss"});
+ dt.Rows.Add(new object[] {123});
Assert.IsFalse (tableInitialized, "TableInitialized #01");
dt.Initialized -= new EventHandler (OnTableInitialized);
}
tableInitialized = false;
dt.Initialized += new EventHandler (OnTableInitialized);
dt.Columns.Add("Series Label", typeof(SqlInt32));
- dt.Rows.Add(new object[] {"sss"});
+ dt.Rows.Add(new object[] {123});
dt.EndInit ();
dt.Initialized -= new EventHandler (OnTableInitialized);
Assert.IsTrue (tableInitialized, "TableInitialized #02");
tableInitialized = true;
dt.Initialized += new EventHandler (OnTableInitialized);
dt.Columns.Add("Series Label", typeof(SqlInt32));
- dt.Rows.Add(new object[] {"sss"});
+ dt.Rows.Add(new object[] {123});
Assert.AreEqual (tableInitialized, dt.IsInitialized, "TableInitialized #03");
dt.Initialized -= new EventHandler (OnTableInitialized);
}
tableInitialized = false;
dt.Initialized += new EventHandler (OnTableInitialized);
dt.Columns.Add("Series Label", typeof(SqlInt32));
- dt.Rows.Add(new object[] {"sss"});
+ dt.Rows.Add(new object[] {123});
Assert.IsFalse (dt.IsInitialized, "TableInitialized #05");
dt.EndInit ();
Assert.IsTrue (dt.IsInitialized, "TableInitialized #06");
substring = TextString.Substring (0, TextString.IndexOf (EOL));
TextString = TextString.Substring (TextString.IndexOf (EOL) + EOL.Length);
- Assert.AreEqual (" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"en-US\" msdata:MainDataTable=\"Region\" name=\"Root\">", substring, "test#03");
+ // Looks like whoever added this test depended on English culture, which is wrong.
+ Assert.AreEqual (" <xs:element msdata:IsDataSet=\"true\" msdata:MainDataTable=\"Region\" msdata:UseCurrentLocale=\"true\" name=\"Root\">", substring, "test#03");
substring = TextString.Substring (0, TextString.IndexOf (EOL));
TextString = TextString.Substring (TextString.IndexOf (EOL) + EOL.Length);
Assert.AreEqual (tableName, table.TableName, "#6");
Assert.AreEqual (2, table.Constraints.Count, "#7");
Assert.AreEqual ("", table.Prefix, "#8");
- Assert.AreEqual ("Constraint1", table.Constraints [0].ToString (), "#9");
- Assert.AreEqual ("Constraint2", table.Constraints [1].ToString (), "#10");
+ Assert.AreEqual ("Constraint2", table.Constraints [0].ToString (), "#9");
+ Assert.AreEqual ("Constraint1", table.Constraints [1].ToString (), "#10");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#11");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [1].GetType (), "#12");
Assert.AreEqual (2, table.PrimaryKey.Length, "#13");
Assert.AreEqual (tableName, table.TableName, "#6");
Assert.AreEqual (2, table.Constraints.Count, "#7");
Assert.AreEqual (string.Empty, table.Prefix, "#8");
- Assert.AreEqual ("Constraint1", table.Constraints [0].ToString (), "#9");
- Assert.AreEqual ("Constraint2", table.Constraints [1].ToString (), "#10");
+ Assert.AreEqual ("Constraint2", table.Constraints [0].ToString (), "#9");
+ Assert.AreEqual ("Constraint1", table.Constraints [1].ToString (), "#10");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#11");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [1].GetType (), "#12");
Assert.AreEqual (2, table.PrimaryKey.Length, "#13");
Assert.AreEqual (tableName, table.TableName, "#6");
Assert.AreEqual (2, table.Constraints.Count, "#7");
Assert.AreEqual (string.Empty, table.Prefix, "#8");
- Assert.AreEqual ("Constraint1", table.Constraints [0].ToString (), "#9");
- Assert.AreEqual ("Constraint2", table.Constraints [1].ToString (), "#10");
+ Assert.AreEqual ("Constraint2", table.Constraints [0].ToString (), "#9");
+ Assert.AreEqual ("Constraint1", table.Constraints [1].ToString (), "#10");
Assert.AreEqual ("System.Data.UniqueConstraint", table.Constraints [0].GetType ().ToString (), "#11");
Assert.AreEqual ("System.Data.UniqueConstraint", table.Constraints [1].GetType ().ToString (), "#12");
Assert.AreEqual (2, table.PrimaryKey.Length, "#13");
VerifyTable_WithChildren (table, parentTable1.TableName, parentTable1.DataSet);
//Check Properties of First Child Table
- DataTable firstChildTable = table.ChildRelations [0].ChildTable;
+ DataTable firstChildTable = table.ChildRelations [1].ChildTable;
Assert.AreEqual (string.Empty, firstChildTable.Namespace, "#1");
Assert.AreEqual ("XmlDataSet", firstChildTable.DataSet.DataSetName, "#2");
Assert.AreEqual (3, firstChildTable.Columns.Count, "#3");
Assert.AreEqual (0, firstChildTable.PrimaryKey.Length, "#17");
//Check Properties of Second Child Table
- DataTable secondChildTable = table.ChildRelations [1].ChildTable;
+ DataTable secondChildTable = table.ChildRelations [0].ChildTable;
Assert.AreEqual (string.Empty, secondChildTable.Namespace, "#18");
Assert.AreEqual ("XmlDataSet", secondChildTable.DataSet.DataSetName, "#19");
Assert.AreEqual (4, secondChildTable.Columns.Count, "#20");
Assert.AreEqual (0, col.AutoIncrementSeed, "#15");
Assert.AreEqual (1, col.AutoIncrementStep, "#16");
Assert.AreEqual ("Element", col.ColumnMapping.ToString (), "#17");
- Assert.AreEqual ("ChildID", col.Caption, "#18");
+ Assert.AreEqual ("ID", col.Caption, "#18");
Assert.AreEqual ("ChildID", col.ColumnName, "#19");
Assert.AreEqual (typeof (int), col.DataType, "#20");
Assert.AreEqual (string.Empty, col.DefaultValue.ToString (), "#21");
//Check the rows
foreach (DataRow row in table.Rows)
- Assert.IsNull (row [0], "#8");
+ Assert.AreEqual (DBNull.Value, row [0], "#8");
}
[Test]
Assert.AreEqual (1, row ["id"], "#14");
Assert.AreEqual ("ParentItem 1", row ["ParentItem"], "#15");
Assert.AreEqual (1, row ["DepartmentID"], "#16");
- Assert.IsNull (row ["DummyColumn"], "#17");
+ Assert.AreEqual (DBNull.Value, row ["DummyColumn"], "#17");
row = table.Rows [1];
Assert.AreEqual (2, row ["id"], "#18");
Assert.AreEqual ("ParentItem 2", row ["ParentItem"], "#19");
Assert.AreEqual (2, row ["DepartmentID"], "#20");
- Assert.IsNull (row ["DummyColumn"], "#21");
+ Assert.AreEqual (DBNull.Value, row ["DummyColumn"], "#21");
row = table.Rows [2];
Assert.AreEqual (3, row ["id"], "#22");
Assert.AreEqual ("ParentItem 3", row ["ParentItem"], "#23");
Assert.AreEqual (3, row ["DepartmentID"], "#24");
- Assert.IsNull (row ["DummyColumn"], "#25");
+ Assert.AreEqual (DBNull.Value, row ["DummyColumn"], "#25");
}
[Test]
dataView = null;
}
+ [Test]
+ [ExpectedException (typeof (DataException))]
+ public void TestSortWithoutTable ()
+ {
+ DataView dv = new DataView ();
+ dv.Table = new DataTable ();
+ dv.Sort = "abc";
+ }
+
[Test]
public void TestSort ()
{
DataView dv = new DataView ();
+ dv.Table = new DataTable ("dummy");
+ dv.Table.Columns.Add ("abc");
dv.Sort = "abc";
dv.Sort = string.Empty;
dv.Sort = "abc";
AssertNull ("#1", dv.Table);
dv.EndInit ();
- AssertEquals ("#2", table, dv.Table);
+ AssertNull ("#2", dv.Table); // still.
AssertEquals ("#3", 0, table.Columns.Count);
table.EndInit ();
+ AssertEquals ("#5", table, dv.Table);
AssertEquals ("#4", 2, table.Columns.Count);
}
dv.Table = table;
AssertNull ("#1", dv.Table);
dv.EndInit ();
-
- dv.Initialized -= new EventHandler (OnDataViewInitialized);
- AssertEquals ("#2", table, dv.Table);
+ AssertNull ("#2", dv.Table);
AssertEquals ("#3", 0, table.Columns.Count);
table.EndInit ();
+
+ dv.Initialized -= new EventHandler (OnDataViewInitialized); // this should not be unregistered before table.EndInit().
+
AssertEquals ("#4", 2, table.Columns.Count);
- AssertEquals("DataViewInitialized #5", dvInitialized, true);
+ AssertEquals ("#6", table, dv.Table);
+ AssertEquals ("DataViewInitialized #5", true, dvInitialized);
}
[Test]
}
[Test]
- [ExpectedException (typeof (DataException))]
+ [ExpectedException (typeof (IndexOutOfRangeException))]
public void TestDeleteClosed ()
{
DataView TestView = new DataView (dataTable);
TestView.Dispose (); // Close the table
- TestView.Delete (0);
+ TestView.Delete (0); // cannot access to item at 0.
}
[Test] // based on bug #74631
[Test]
public void CancelEditAndEvents ()
{
- string reference = " =====ItemAdded:3 ------4 =====ItemAdded:4 ------5 =====ItemAdded:5 ------6 =====ItemDeleted:5 ------5 =====ItemAdded:5";
+ string reference = " =====ItemAdded:3 ------4 =====ItemAdded:3 =====ItemAdded:4 ------5 =====ItemAdded:4 =====ItemAdded:5 ------6 =====ItemDeleted:5 ------5 =====ItemAdded:5";
eventWriter = new StringWriter ();
{
string result = @"setting table...
---- OnListChanged PropertyDescriptorChanged,0,0
------ UpdateIndex : True
---- OnListChanged Reset,-1,-1
table was set.
---- OnListChanged PropertyDescriptorChanged,0,0
{
string result = @"setting table...
---- OnListChanged PropertyDescriptorChanged,0,0
------ UpdateIndex : True
---- OnListChanged Reset,-1,-1
table was set.
---- OnListChanged PropertyDescriptorAdded,0,0
dv.Sort = "String1,ChildId";
// Find = wrong sort, can not find
- dvArr = dv.FindRows(new object[] {"3","3-String1"});
- Assert.AreEqual(0, dvArr.Length , "DV42");
+ try
+ {
+ dvArr = dv.FindRows(new object[] {"3","3-String1"});
+ Assert.Fail("DV42: FindRows Failed to throw ArgumentException");
+ }
+ catch (FormatException) {}
+ catch (AssertionException exc) {throw exc;}
+ catch (Exception exc)
+ {
+ Assert.Fail("DV42-2: FindRows. Wrong exception type. Got:" + exc);
+ }
dv.Sort = "ChildId,String1";
dv.Sort = "String1,ParentId";
// Find = wrong sort, can not find
- FindResult = dv.Find(new object[] {"3","3-String1"});
- Assert.AreEqual(-1, FindResult , "DV51");
+ try
+ {
+ FindResult = dv.Find(new object[] {"3","3-String1"});
+ Assert.Fail("DV51: Find Failed to throw ArgumentException");
+ }
+ catch (FormatException) {}
+ catch (AssertionException exc) {throw exc;}
+ catch (Exception exc)
+ {
+ Assert.Fail("DV51-2: Find. Wrong exception type. Got:" + exc);
+ }
dv.Sort = "ParentId,String1";
// Find
// change value - NewIndex
Assert.AreEqual(1, evProp.NewIndex, "DV60");
// change value - OldIndex
- Assert.AreEqual(-1, evProp.OldIndex , "DV61");
+ Assert.AreEqual(1, evProp.OldIndex , "DV61");
// ----- Add New ---------
evProp = null;
evProp = null;
table.Rows[0][0] = 5;
Assert.AreEqual (0, evProp.NewIndex, "#4");
- Assert.AreEqual (-1, evProp.OldIndex, "#5");
+ Assert.AreEqual (0, evProp.OldIndex, "#5");
Assert.AreEqual (ListChangedType.ItemChanged, evProp.lstType, "#6");
evProp = null;
try {
DataTable tmp = fkc.Table;
Fail ("When table is null, get_Table causes an InvalidOperationException.");
+ } catch (NullReferenceException) { // actually .NET throws this (bug)
} catch (InvalidOperationException) {
}
throw new ApplicationException ("An Exception was expected");
}
// LAMESPEC : spec says InvalidConstraintException but throws this
- catch (ArgumentException) {
+ catch (NullReferenceException) {
}
#if false // FIXME: Here this test crashes under MS.NET.
Assert( "Equals failed diff. 1" , fkc.Equals(fkcDiff) == false);
- Assert( "Hash Code Failed. 1", fkc.GetHashCode() == fkc2.GetHashCode() );
+ //Assert( "Hash Code Failed. 1", fkc.GetHashCode() == fkc2.GetHashCode() );
Assert( "Hash Code Failed. 2", fkc.GetHashCode() != fkcDiff.GetHashCode() );
}
Assert.That (cst3.Equals (cst), Is.False, "A3");
Assert.That (cst.Equals (cst4), Is.False, "A4");
- //true
- Assert.That (cst.GetHashCode (), Is.EqualTo (cst2.GetHashCode ()), "HashEquals");
+ //false... but it should be true (FXDG violation)
+ //Assert.That (cst.GetHashCode (), Is.Not.EqualTo (cst2.GetHashCode ()), "HashEquals");
//false
Assert.That (cst.GetHashCode (), Is.Not.EqualTo (cst3.GetHashCode ()), "Hash Not Equals");