Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/DesignWaterLevelLocationsContextPropertyInfoTest.cs =================================================================== diff -u -r5a54a4db63685bd36cc9b979d2358c32a8a0f405 -re61200e6c946ac66439f9788cb96dd1ca76c1a7d --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/DesignWaterLevelLocationsContextPropertyInfoTest.cs (.../DesignWaterLevelLocationsContextPropertyInfoTest.cs) (revision 5a54a4db63685bd36cc9b979d2358c32a8a0f405) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/DesignWaterLevelLocationsContextPropertyInfoTest.cs (.../DesignWaterLevelLocationsContextPropertyInfoTest.cs) (revision e61200e6c946ac66439f9788cb96dd1ca76c1a7d) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Collections.Generic; using System.Linq; using Core.Common.Base; using Core.Common.Gui.Plugin; @@ -62,31 +61,29 @@ mockRepository.ReplayAll(); var random = new Random(); - var hydraulicBoundaryLocations = new ObservableList(); - var hydraulicBoundaryLocationsLookup = new Dictionary + + var hydraulicBoundaryLocations = new ObservableList { + new TestHydraulicBoundaryLocation(), + new TestHydraulicBoundaryLocation() + }; + + var hydraulicBoundaryLocationCalculations = new[] + { + new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocations[0]) { - new TestHydraulicBoundaryLocation(), - new HydraulicBoundaryLocationCalculation - { - Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()) - } + Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()) }, + new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocations[1]) { - new TestHydraulicBoundaryLocation(), - new HydraulicBoundaryLocationCalculation - { - Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()) - } + Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()) } }; - hydraulicBoundaryLocations.AddRange(hydraulicBoundaryLocationsLookup.Keys); - var context = new DesignWaterLevelLocationsContext(hydraulicBoundaryLocations, assessmentSection, () => 0.01, - hbl => hydraulicBoundaryLocationsLookup[hbl], + hbl => hydraulicBoundaryLocationCalculations.First(hblc => ReferenceEquals(hblc.HydraulicBoundaryLocation, hbl)), "Category"); using (var plugin = new RingtoetsPlugin()) @@ -100,8 +97,8 @@ Assert.IsInstanceOf(objectProperties); Assert.AreSame(hydraulicBoundaryLocations, objectProperties.Data); DesignWaterLevelLocationProperties[] locationProperties = ((DesignWaterLevelLocationsProperties) objectProperties).Locations; - CollectionAssert.AreEqual(hydraulicBoundaryLocationsLookup.Keys, locationProperties.Select(p => p.Data)); - CollectionAssert.AreEqual(hydraulicBoundaryLocationsLookup.Values.Select(c => c.Output.Result), locationProperties.Select(p => p.DesignWaterLevel)); + CollectionAssert.AreEqual(hydraulicBoundaryLocations, locationProperties.Select(p => p.Data)); + CollectionAssert.AreEqual(hydraulicBoundaryLocationCalculations.Select(c => c.Output.Result), locationProperties.Select(p => p.DesignWaterLevel)); } mockRepository.VerifyAll();