Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rd372d283df25bff1c4c41c6c544929a38917004e -r9c0ef646a1938dcab474ec22c94a08d597fdbcf8 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision d372d283df25bff1c4c41c6c544929a38917004e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 9c0ef646a1938dcab474ec22c94a08d597fdbcf8) @@ -328,8 +328,7 @@ // Assert Assert.AreEqual(1, performedCalculations.Length); - HydraulicBoundaryLocation expectedLocation = testHydraulicBoundaryDatabase.Locations.First(); - Assert.AreSame(expectedLocation, performedCalculations.First().HydraulicBoundaryLocation); + Assert.AreSame(testHydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -376,19 +375,17 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; - normValue = (double) invocation.Arguments[4]; - messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); + normValue = (double) invocation.Arguments[3]; + messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[4]; }); mockRepository.ReplayAll(); @@ -411,10 +408,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual("", preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.DesignWaterLevelCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -445,17 +440,15 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); normValue = (double) invocation.Arguments[4]; messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; }); @@ -480,10 +473,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual(preprocessorDirectory, preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.DesignWaterLevelCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -513,17 +504,15 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); normValue = (double) invocation.Arguments[4]; messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; }); @@ -548,10 +537,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual(string.Empty, preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.DesignWaterLevelCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } private DataGridView GetLocationsDataGridView() Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -rd372d283df25bff1c4c41c6c544929a38917004e -r9c0ef646a1938dcab474ec22c94a08d597fdbcf8 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision d372d283df25bff1c4c41c6c544929a38917004e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 9c0ef646a1938dcab474ec22c94a08d597fdbcf8) @@ -328,8 +328,7 @@ // Assert Assert.AreEqual(1, performedCalculations.Length); - HydraulicBoundaryLocation expectedLocation = testHydraulicBoundaryDatabase.Locations.First(); - Assert.AreSame(expectedLocation, performedCalculations.First().HydraulicBoundaryLocation); + Assert.AreSame(testHydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -376,19 +375,17 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; - normValue = (double) invocation.Arguments[4]; - messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); + normValue = (double) invocation.Arguments[3]; + messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[4]; }); mockRepository.ReplayAll(); @@ -411,10 +408,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual("", preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.WaveHeightCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -445,19 +440,17 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; - normValue = (double) invocation.Arguments[4]; - messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); + normValue = (double) invocation.Arguments[3]; + messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[4]; }); mockRepository.ReplayAll(); @@ -480,10 +473,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual(preprocessorDirectory, preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.WaveHeightCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } [Test] @@ -513,19 +504,17 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; - HydraulicBoundaryLocation[] calculatedLocationsValue = null; - Func getCalculationFunc = null; + HydraulicBoundaryLocationCalculation[] performedCalculations = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; - guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); - calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); - getCalculationFunc = (Func) invocation.Arguments[3]; - normValue = (double) invocation.Arguments[4]; - messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; + performedCalculations = ((IEnumerable) invocation.Arguments[2]).ToArray(); + normValue = (double) invocation.Arguments[3]; + messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[4]; }); mockRepository.ReplayAll(); @@ -548,10 +537,8 @@ Assert.AreEqual(databaseFilePath, hydraulicBoundaryDatabaseFilePathValue); Assert.AreEqual(string.Empty, preprocessorDirectoryValue); Assert.AreEqual(norm, normValue); - Assert.AreEqual(1, calculatedLocationsValue.Length); - HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); - Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); - Assert.AreSame(expectedLocation.WaveHeightCalculation1, getCalculationFunc(expectedLocation)); + Assert.AreEqual(1, performedCalculations.Length); + Assert.AreSame(hydraulicBoundaryDatabase.Locations.First(), performedCalculations.First().HydraulicBoundaryLocation); } private DataGridView GetLocationsDataGridView()