Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs =================================================================== diff -u -r1c568c57d0e52050b688773ec8570157c894d4a9 -r9ca2ce99f8b1d93fb1edde4e505b5acc5094a256 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs (.../ClosingStructureTest.cs) (revision 1c568c57d0e52050b688773ec8570157c894d4a9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs (.../ClosingStructureTest.cs) (revision 9ca2ce99f8b1d93fb1edde4e505b5acc5094a256) @@ -353,21 +353,21 @@ // Assert Assert.AreNotEqual(otherStructure.Id, structure.Id); Assert.AreEqual(otherStructure.Name, structure.Name); - AssertAreEqualButNotSame(otherStructure.Location, structure.Location); + TestHelper.AssertAreEqualButNotSame(otherStructure.Location, structure.Location); Assert.AreEqual(otherStructure.StructureNormalOrientation, structure.StructureNormalOrientation); - AssertAreEqualButNotSame(otherStructure.AllowedLevelIncreaseStorage, structure.AllowedLevelIncreaseStorage); - AssertAreEqualButNotSame(otherStructure.AreaFlowApertures, structure.AreaFlowApertures); - AssertAreEqualButNotSame(otherStructure.CriticalOvertoppingDischarge, structure.CriticalOvertoppingDischarge); + TestHelper.AssertAreEqualButNotSame(otherStructure.AllowedLevelIncreaseStorage, structure.AllowedLevelIncreaseStorage); + TestHelper.AssertAreEqualButNotSame(otherStructure.AreaFlowApertures, structure.AreaFlowApertures); + TestHelper.AssertAreEqualButNotSame(otherStructure.CriticalOvertoppingDischarge, structure.CriticalOvertoppingDischarge); Assert.AreEqual(otherStructure.FailureProbabilityOpenStructure, structure.FailureProbabilityOpenStructure); Assert.AreEqual(otherStructure.FailureProbabilityReparation, structure.FailureProbabilityReparation); Assert.AreEqual(otherStructure.IdenticalApertures, structure.IdenticalApertures); Assert.AreEqual(otherStructure.ProbabilityOrFrequencyOpenStructureBeforeFlooding, structure.ProbabilityOrFrequencyOpenStructureBeforeFlooding); - AssertAreEqualButNotSame(otherStructure.FlowWidthAtBottomProtection, structure.FlowWidthAtBottomProtection); - AssertAreEqualButNotSame(otherStructure.InsideWaterLevel, structure.InsideWaterLevel); - AssertAreEqualButNotSame(otherStructure.LevelCrestStructureNotClosing, structure.LevelCrestStructureNotClosing); - AssertAreEqualButNotSame(otherStructure.StorageStructureArea, structure.StorageStructureArea); - AssertAreEqualButNotSame(otherStructure.ThresholdHeightOpenWeir, structure.ThresholdHeightOpenWeir); - AssertAreEqualButNotSame(otherStructure.WidthFlowApertures, structure.WidthFlowApertures); + TestHelper.AssertAreEqualButNotSame(otherStructure.FlowWidthAtBottomProtection, structure.FlowWidthAtBottomProtection); + TestHelper.AssertAreEqualButNotSame(otherStructure.InsideWaterLevel, structure.InsideWaterLevel); + TestHelper.AssertAreEqualButNotSame(otherStructure.LevelCrestStructureNotClosing, structure.LevelCrestStructureNotClosing); + TestHelper.AssertAreEqualButNotSame(otherStructure.StorageStructureArea, structure.StorageStructureArea); + TestHelper.AssertAreEqualButNotSame(otherStructure.ThresholdHeightOpenWeir, structure.ThresholdHeightOpenWeir); + TestHelper.AssertAreEqualButNotSame(otherStructure.WidthFlowApertures, structure.WidthFlowApertures); } [Test] @@ -448,11 +448,5 @@ // Assert Assert.AreEqual(hashCodeOne, hashCodeTwo); } - - private static void AssertAreEqualButNotSame(object expected, object actual) - { - Assert.AreEqual(expected, actual, "Objects not equal"); - Assert.AreNotSame(expected, actual, "Objects the same"); - } } } \ No newline at end of file