Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Standard/ObjectCopierTest.cs =================================================================== diff -u -r4540 -r4624 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Standard/ObjectCopierTest.cs (.../ObjectCopierTest.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Standard/ObjectCopierTest.cs (.../ObjectCopierTest.cs) (revision 4624) @@ -58,46 +58,46 @@ // check if copy is done correctly ComparisonResult result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(0, result.Differences.Count); + Assert.That(result.Differences.Count, Is.EqualTo(0)); // change double array differentPropertiesCopy.DoubleArray[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(1, result.Differences.Count); - Assert.AreNotEqual(differentProperties.DoubleArray[0], differentPropertiesCopy.DoubleArray[0]); + Assert.That(result.Differences.Count, Is.EqualTo(1)); + Assert.That(differentPropertiesCopy.DoubleArray[0], Is.Not.EqualTo(differentProperties.DoubleArray[0])); // change integer array differentPropertiesCopy.IntArray[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(differentProperties.IntArray[0], differentPropertiesCopy.IntArray[0]); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(differentPropertiesCopy.IntArray[0], Is.Not.EqualTo(differentProperties.IntArray[0])); // change string array differentPropertiesCopy.StrArray[0] = "99"; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(3, result.Differences.Count); - Assert.AreNotEqual(differentProperties.StrArray[0], differentPropertiesCopy.StrArray[0]); + Assert.That(result.Differences.Count, Is.EqualTo(3)); + Assert.That(differentPropertiesCopy.StrArray[0], Is.Not.EqualTo(differentProperties.StrArray[0])); // change boolean array differentPropertiesCopy.BoolArray[0] = false; differentPropertiesCopy.BoolArray[1] = false; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(5, result.Differences.Count); - Assert.AreNotEqual(differentProperties.BoolArray[0], differentPropertiesCopy.BoolArray[0]); - Assert.AreNotEqual(differentProperties.BoolArray[1], differentPropertiesCopy.BoolArray[1]); + Assert.That(result.Differences.Count, Is.EqualTo(5)); + Assert.That(differentPropertiesCopy.BoolArray[0], Is.Not.EqualTo(differentProperties.BoolArray[0])); + Assert.That(differentPropertiesCopy.BoolArray[1], Is.Not.EqualTo(differentProperties.BoolArray[1])); // change geometryPoint array testPointDifferentObjectsCopy.TestPointArray[1].X = 99; testPointDifferentObjectsCopy.TestPointArray[1].Z = 99; result = compare.Compare(testPointDifferentObjects, testPointDifferentObjectsCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(testPointDifferentObjects.TestPointArray[1].X, testPointDifferentObjectsCopy.TestPointArray[1].X); - Assert.AreNotEqual(testPointDifferentObjects.TestPointArray[1].Z, testPointDifferentObjectsCopy.TestPointArray[1].Z); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(testPointDifferentObjectsCopy.TestPointArray[1].X, Is.Not.EqualTo(testPointDifferentObjects.TestPointArray[1].X)); + Assert.That(testPointDifferentObjectsCopy.TestPointArray[1].Z, Is.Not.EqualTo(testPointDifferentObjects.TestPointArray[1].Z)); } /// @@ -126,46 +126,46 @@ // check if copy is done correctly ComparisonResult result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(0, result.Differences.Count); + Assert.That(result.Differences.Count, Is.EqualTo(0)); // change double list differentPropertiesCopy.DoubleList[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(1, result.Differences.Count); - Assert.AreNotEqual(differentProperties.DoubleList[0], differentPropertiesCopy.DoubleList[0]); + Assert.That(result.Differences.Count, Is.EqualTo(1)); + Assert.That(differentPropertiesCopy.DoubleList[0], Is.Not.EqualTo(differentProperties.DoubleList[0])); // change integer list differentPropertiesCopy.IntList[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(differentProperties.IntList[0], differentPropertiesCopy.IntList[0]); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(differentPropertiesCopy.IntList[0], Is.Not.EqualTo(differentProperties.IntList[0])); // change string list differentPropertiesCopy.StrList[0] = "99"; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(3, result.Differences.Count); - Assert.AreNotEqual(differentProperties.StrList[0], differentPropertiesCopy.StrList[0]); + Assert.That(result.Differences.Count, Is.EqualTo(3)); + Assert.That(differentPropertiesCopy.StrList[0], Is.Not.EqualTo(differentProperties.StrList[0])); // change boolean list differentPropertiesCopy.BoolList[0] = false; differentPropertiesCopy.BoolList[1] = false; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(5, result.Differences.Count); - Assert.AreNotEqual(differentProperties.BoolList[0], differentPropertiesCopy.BoolList[0]); - Assert.AreNotEqual(differentProperties.BoolList[1], differentPropertiesCopy.BoolList[1]); + Assert.That(result.Differences.Count, Is.EqualTo(5)); + Assert.That(differentPropertiesCopy.BoolList[0], Is.Not.EqualTo(differentProperties.BoolList[0])); + Assert.That(differentPropertiesCopy.BoolList[1], Is.Not.EqualTo(differentProperties.BoolList[1])); // change geometryPoint list testPointDifferentObjectsCopy.TestPointList[1].X = 99; testPointDifferentObjectsCopy.TestPointList[1].Z = 99; result = compare.Compare(testPointDifferentObjects, testPointDifferentObjectsCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(testPointDifferentObjects.TestPointList[1].X, testPointDifferentObjectsCopy.TestPointList[1].X); - Assert.AreNotEqual(testPointDifferentObjects.TestPointList[1].Z, testPointDifferentObjectsCopy.TestPointList[1].Z); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(testPointDifferentObjectsCopy.TestPointList[1].X, Is.Not.EqualTo(testPointDifferentObjects.TestPointList[1].X)); + Assert.That(testPointDifferentObjectsCopy.TestPointList[1].Z, Is.Not.EqualTo(testPointDifferentObjects.TestPointList[1].Z)); } /// @@ -194,46 +194,46 @@ // check if copy is done correctly ComparisonResult result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(0, result.Differences.Count); + Assert.That(result.Differences.Count, Is.EqualTo(0)); // change double dictionary differentPropertiesCopy.DoubleDictionary[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(1, result.Differences.Count); - Assert.AreNotEqual(differentProperties.DoubleDictionary[0], differentPropertiesCopy.DoubleDictionary[0]); + Assert.That(result.Differences.Count, Is.EqualTo(1)); + Assert.That(differentPropertiesCopy.DoubleDictionary[0], Is.Not.EqualTo(differentProperties.DoubleDictionary[0])); // change integer dictionary differentPropertiesCopy.IntDictionary[0] = 99; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(differentProperties.IntDictionary[0], differentPropertiesCopy.IntDictionary[0]); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(differentPropertiesCopy.IntDictionary[0], Is.Not.EqualTo(differentProperties.IntDictionary[0])); // change string dictionary differentPropertiesCopy.StrDictionary["0"] = "99"; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(3, result.Differences.Count); - Assert.AreNotEqual(differentProperties.StrDictionary["0"], differentPropertiesCopy.StrDictionary["0"]); + Assert.That(result.Differences.Count, Is.EqualTo(3)); + Assert.That(differentPropertiesCopy.StrDictionary["0"], Is.Not.EqualTo(differentProperties.StrDictionary["0"])); // change boolean dictionary differentPropertiesCopy.BoolDictionary[0] = false; differentPropertiesCopy.BoolDictionary[1] = false; result = compare.Compare(differentProperties, differentPropertiesCopy); - Assert.AreEqual(5, result.Differences.Count); - Assert.AreNotEqual(differentProperties.BoolDictionary[0], differentPropertiesCopy.BoolDictionary[0]); - Assert.AreNotEqual(differentProperties.BoolDictionary[1], differentPropertiesCopy.BoolDictionary[1]); + Assert.That(result.Differences.Count, Is.EqualTo(5)); + Assert.That(differentPropertiesCopy.BoolDictionary[0], Is.Not.EqualTo(differentProperties.BoolDictionary[0])); + Assert.That(differentPropertiesCopy.BoolDictionary[1], Is.Not.EqualTo(differentProperties.BoolDictionary[1])); // change geometryPoint dictionary testPointDifferentObjectsCopy.TestPointDictionary[1].X = 99; testPointDifferentObjectsCopy.TestPointDictionary[1].Z = 99; result = compare.Compare(testPointDifferentObjects, testPointDifferentObjectsCopy); - Assert.AreEqual(2, result.Differences.Count); - Assert.AreNotEqual(testPointDifferentObjects.TestPointDictionary[1].X, testPointDifferentObjectsCopy.TestPointDictionary[1].X); - Assert.AreNotEqual(testPointDifferentObjects.TestPointDictionary[1].Z, testPointDifferentObjectsCopy.TestPointDictionary[1].Z); + Assert.That(result.Differences.Count, Is.EqualTo(2)); + Assert.That(testPointDifferentObjectsCopy.TestPointDictionary[1].X, Is.Not.EqualTo(testPointDifferentObjects.TestPointDictionary[1].X)); + Assert.That(testPointDifferentObjectsCopy.TestPointDictionary[1].Z, Is.Not.EqualTo(testPointDifferentObjects.TestPointDictionary[1].Z)); } internal class TestPoint