Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationOutput.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationOutput.cs (.../HydraulicBoundaryLocationOutput.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationOutput.cs (.../HydraulicBoundaryLocationOutput.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -97,9 +97,9 @@ public CalculationConvergence CalculationConvergence { get; } /// - /// Gets the general illustration points result. + /// Gets the general results with the submechanism illustration points. /// - public GeneralResult GeneralResult { get; private set; } + public GeneralResultSubMechanismIllustrationPoint GeneralResultSubMechanismIllustrationPoint { get; private set; } /// /// Gets the value indicating whether the output contains illustration points. @@ -108,23 +108,23 @@ { get { - return GeneralResult != null; + return GeneralResultSubMechanismIllustrationPoint != null; } } /// - /// Sets the general result of the illustration points. + /// Sets the general result with the submechanism illustration points. /// - /// The general result to set. - /// Thrown when + /// + /// Thrown when /// is null. - public void SetIllustrationPoints(GeneralResult generalResult) + public void SetIllustrationPoints(GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint) { - if (generalResult == null) + if (generalResultSubMechanismIllustrationPoint == null) { - throw new ArgumentNullException(nameof(generalResult)); + throw new ArgumentNullException(nameof(generalResultSubMechanismIllustrationPoint)); } - GeneralResult = generalResult; + GeneralResultSubMechanismIllustrationPoint = generalResultSubMechanismIllustrationPoint; } } } \ No newline at end of file Fisheye: Tag 8ba742d2139563c9571e32f074c7c4b3077f45ee refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPoint.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPoint.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPoint.cs (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -0,0 +1,78 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; + +namespace Ringtoets.Common.Data.Hydraulics.IllustrationPoints +{ + /// + /// The general submechanism illustration points result. + /// + public class GeneralResultSubMechanismIllustrationPoint + { + /// + /// Creates a new instance of . + /// + /// The governing wind direction. + /// The general alpha values. + /// A collection of illustration + /// points for every combination of a wind direction and a closing situation. + /// Thrown when , + /// or is null. + public GeneralResultSubMechanismIllustrationPoint(WindDirection governingWindDirection, + IEnumerable stochasts, + IEnumerable topLevelSubMechanismIllustrationPoints) + { + if (governingWindDirection == null) + { + throw new ArgumentNullException(nameof(governingWindDirection)); + } + if (stochasts == null) + { + throw new ArgumentNullException(nameof(stochasts)); + } + if (topLevelSubMechanismIllustrationPoints == null) + { + throw new ArgumentNullException(nameof(topLevelSubMechanismIllustrationPoints)); + } + + GoverningWindDirection = governingWindDirection; + Stochasts = stochasts; + TopLevelSubMechanismIllustrationPoints = topLevelSubMechanismIllustrationPoints; + } + + /// + /// Gets the governing wind direction. + /// + public WindDirection GoverningWindDirection { get; } + + /// + /// Gets the general alpha values. + /// + public IEnumerable Stochasts { get; } + + /// + /// Gets the collection of illustration points for every combination of a wind direction and a closing situation. + /// + public IEnumerable TopLevelSubMechanismIllustrationPoints { get; } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -68,7 +68,7 @@ - + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs (.../RingtoetsStackChartDataFactory.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs (.../RingtoetsStackChartDataFactory.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -48,21 +48,21 @@ /// /// Creates the columns for the given . /// - /// The data to create the columns from. + /// The data to create the columns from. /// The stack chart data to create the columns for. /// Thrown when any parameter is null. - public static void CreateColumns(GeneralResult generalResult, StackChartData stackChartData) + public static void CreateColumns(GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint, StackChartData stackChartData) { - if (generalResult == null) + if (generalResultSubMechanismIllustrationPoint == null) { - throw new ArgumentNullException(nameof(generalResult)); + throw new ArgumentNullException(nameof(generalResultSubMechanismIllustrationPoint)); } if (stackChartData == null) { throw new ArgumentNullException(nameof(stackChartData)); } - Tuple[] labels = generalResult.TopLevelSubMechanismIllustrationPoints + Tuple[] labels = generalResultSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoints .Select(illustrationPoint => new Tuple(illustrationPoint.WindDirection.Name, illustrationPoint.ClosingSituation)) @@ -88,14 +88,14 @@ /// /// Creates the rows for the given . /// - /// The data to create the rows from. + /// The data to create the rows from. /// The stack chart data to create the rows for. /// Thrown when any parameter is null. - public static void CreateRows(GeneralResult generalResult, StackChartData stackChartData) + public static void CreateRows(GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint, StackChartData stackChartData) { - if (generalResult == null) + if (generalResultSubMechanismIllustrationPoint == null) { - throw new ArgumentNullException(nameof(generalResult)); + throw new ArgumentNullException(nameof(generalResultSubMechanismIllustrationPoint)); } if (stackChartData == null) { @@ -104,7 +104,7 @@ var stochastValues = new List>(); - foreach (TopLevelSubMechanismIllustrationPoint illustrationPoint in generalResult.TopLevelSubMechanismIllustrationPoints) + foreach (TopLevelSubMechanismIllustrationPoint illustrationPoint in generalResultSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoints) { stochastValues.AddRange(illustrationPoint.SubMechanismIllustrationPoint.Stochasts .Select(illustrationPointStochast => Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsChartControl.cs =================================================================== diff -u -re74abe0ad35b23cf2350ee7bb786458c3ea53300 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsChartControl.cs (.../IllustrationPointsChartControl.cs) (revision e74abe0ad35b23cf2350ee7bb786458c3ea53300) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsChartControl.cs (.../IllustrationPointsChartControl.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -31,7 +31,7 @@ /// public partial class IllustrationPointsChartControl : UserControl { - private GeneralResult data; + private GeneralResultSubMechanismIllustrationPoint data; private readonly StackChartData chartData; @@ -49,7 +49,7 @@ /// /// Gets or sets the data of the control. /// - public GeneralResult Data + public GeneralResultSubMechanismIllustrationPoint Data { get { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs =================================================================== diff -u -r82beae540257b0a91094838c1a020d043431a93a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs (.../IllustrationPointsControl.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs (.../IllustrationPointsControl.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -29,7 +29,7 @@ /// public partial class IllustrationPointsControl : UserControl { - private GeneralResult data; + private GeneralResultSubMechanismIllustrationPoint data; /// /// Creates a new instance of . @@ -42,7 +42,7 @@ /// /// Gets or sets the data of the control. /// - public GeneralResult Data + public GeneralResultSubMechanismIllustrationPoint Data { get { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsTableControl.cs =================================================================== diff -u -re26905cfcf52dad59c74508605103c8cf9336d3d -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsTableControl.cs (.../IllustrationPointsTableControl.cs) (revision e26905cfcf52dad59c74508605103c8cf9336d3d) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsTableControl.cs (.../IllustrationPointsTableControl.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -35,7 +35,7 @@ public partial class IllustrationPointsTableControl : UserControl { private const int closingSituationColumnIndex = 1; - private GeneralResult data; + private GeneralResultSubMechanismIllustrationPoint data; /// /// Creates a new instance of . @@ -48,7 +48,7 @@ /// /// Gets or sets the data of the control. /// - public GeneralResult Data + public GeneralResultSubMechanismIllustrationPoint Data { get { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.cs (.../LocationsView.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.cs (.../LocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -171,7 +171,7 @@ protected void HandleHydraulicBoundaryDatabaseUpdate() { dataGridViewControl.RefreshDataGridView(); - illustrationPointsControl.Data = GetGeneralIllustrationPointsResult(); + illustrationPointsControl.Data = GetGeneralResultSubMechanismIllustrationPoints(); } private void LocalizeControls() @@ -192,7 +192,7 @@ { SelectionChanged?.Invoke(this, new EventArgs()); - illustrationPointsControl.Data = GetGeneralIllustrationPointsResult(); + illustrationPointsControl.Data = GetGeneralResultSubMechanismIllustrationPoints(); } #region Event handling @@ -211,11 +211,11 @@ } /// - /// Gets the general illustration points result. + /// Gets the general result with the submechanism illustration points. /// - /// The general illustration points if it has obtained as part of the calculation, null + /// The general result submechanism illustration points if it has obtained as part of the calculation, null /// otherwise. - protected abstract GeneralResult GetGeneralIllustrationPointsResult(); + protected abstract GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints(); private void SelectAllButton_Click(object sender, EventArgs e) { Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -27,6 +27,7 @@ using Core.Common.Utils; using log4net; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service.IllustrationPoints; using Ringtoets.Common.Service.MessageProviders; @@ -179,11 +180,13 @@ } private static void SetIllustrationPointsResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, - HydraGeneralResult generalResult) + HydraGeneralResult hydraGeneralResult) { - if (generalResult != null) + if (hydraGeneralResult != null) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(GeneralResultConverter.CreateGeneralResult(generalResult)); + GeneralResultSubMechanismIllustrationPoint generalResult = + GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraGeneralResult); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(generalResult); } } Fisheye: Tag 8ba742d2139563c9571e32f074c7c4b3077f45ee refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultSubmechanismIllustrationPointConverter.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultSubmechanismIllustrationPointConverter.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultSubmechanismIllustrationPointConverter.cs (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -0,0 +1,88 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; +using HydraRingWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; +using HydraRingIllustrationPointTreeNode = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointTreeNode; +using HydraRingGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult; +using IHydraRingIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IIllustrationPoint; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; + +namespace Ringtoets.Common.Service.IllustrationPoints +{ + /// + /// Converter for related to creating a . + /// + public static class GeneralResultSubmechanismIllustrationPointConverter + { + /// + /// Creates a new instance of + /// based on the information of . + /// + /// The to base the + /// to create on. + /// The newly created . + /// Thrown when is null. + public static GeneralResultSubMechanismIllustrationPoint CreateGeneralResultSubmechanismIllustrationPoint( + HydraRingGeneralResult hydraRingGeneralResult) + { + if (hydraRingGeneralResult == null) + { + throw new ArgumentNullException(nameof(hydraRingGeneralResult)); + } + + WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraRingGeneralResult.GoverningWindDirection); + IEnumerable stochasts = GetStochasts(hydraRingGeneralResult); + IEnumerable windDirectionClosingScenarioIllustrationPoints = + GetWindDirectionClosingSituationIllustrationPoint(hydraRingGeneralResult); + + return new GeneralResultSubMechanismIllustrationPoint(windDirection, stochasts, windDirectionClosingScenarioIllustrationPoints); + } + + private static IEnumerable GetStochasts(HydraRingGeneralResult hydraGeneralResult) + { + return hydraGeneralResult.Stochasts.Select(StochastConverter.CreateStochast); + } + + private static IEnumerable GetWindDirectionClosingSituationIllustrationPoint( + HydraRingGeneralResult hydraGeneralResult) + { + var combinations = new List(); + foreach (KeyValuePair illustrationPointTreeNode in hydraGeneralResult.IllustrationPoints) + { + IHydraRingIllustrationPoint hydraIllustrationPoint = illustrationPointTreeNode.Value.Data; + HydraRingWindDirectionClosingSituation hydraWindDirectionClosingSituation = illustrationPointTreeNode.Key; + + var subMechanismIllustrationPoint = hydraIllustrationPoint as HydraRingSubMechanismIllustrationPoint; + if (subMechanismIllustrationPoint != null) + { + combinations.Add(TopLevelSubMechanismIllustrationPointConverter.CreateTopLevelSubMechanismIllustrationPoint( + hydraWindDirectionClosingSituation, subMechanismIllustrationPoint)); + } + } + + return combinations; + } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj (.../Ringtoets.Common.Service.csproj) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj (.../Ringtoets.Common.Service.csproj) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -48,7 +48,7 @@ - + Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -27,6 +27,7 @@ using Core.Common.Utils; using log4net; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service.IllustrationPoints; using Ringtoets.Common.Service.MessageProviders; @@ -180,11 +181,13 @@ } private static void SetIllustrationPointsResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, - HydraGeneralResult generalResult) + HydraGeneralResult hydraGeneralResult) { - if (generalResult != null) + if (hydraGeneralResult != null) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(GeneralResultConverter.CreateGeneralResult(generalResult)); + GeneralResultSubMechanismIllustrationPoint generalResult = + GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraGeneralResult); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(generalResult); } } Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs =================================================================== diff -u -r7b361b577c778a137cbdb78603822412e189b93e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision 7b361b577c778a137cbdb78603822412e189b93e) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -114,12 +114,12 @@ Assert.AreEqual(calculatedProbability, output.CalculatedProbability); Assert.AreEqual(calculatedReliability, output.CalculatedReliability, output.CalculatedReliability.GetAccuracy()); Assert.AreEqual(convergence, output.CalculationConvergence); - Assert.IsNull(output.GeneralResult); + Assert.IsNull(output.GeneralResultSubMechanismIllustrationPoint); Assert.IsFalse(output.HasIllustrationPoints); } [Test] - public void SetIllustrationPoints_GeneralResultNull_ThrowsArgumentNullException() + public void SetIllustrationPoints_GeneralResultSubMechanismIllustrationPointNull_ThrowsArgumentNullException() { // Setup var random = new Random(32); @@ -131,7 +131,7 @@ // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("generalResult", paramName); + Assert.AreEqual("generalResultSubMechanismIllustrationPoint", paramName); } [Test] @@ -142,13 +142,13 @@ double result = random.NextDouble(); var output = new TestHydraulicBoundaryLocationOutput(result); - var generalResult = new TestGeneralResult(); + var generalResult = new TestGeneralResultSubMechanismIllustrationPoint(); // Call output.SetIllustrationPoints(generalResult); // Assert - Assert.AreSame(generalResult, output.GeneralResult); + Assert.AreSame(generalResult, output.GeneralResultSubMechanismIllustrationPoint); Assert.IsTrue(output.HasIllustrationPoints); } } Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPointTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPointTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultSubMechanismIllustrationPointTest.cs (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -0,0 +1,97 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; + +namespace Ringtoets.Common.Data.Test.Hydraulics.IllustrationPoints +{ + [TestFixture] + public class GeneralResultSubMechanismIllustrationPointTest + { + [Test] + public void Constructor_WindDirectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new GeneralResultSubMechanismIllustrationPoint(null, + Enumerable.Empty(), + Enumerable.Empty()); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("governingWindDirection", paramName); + } + + [Test] + public void Constructor_StochastsNull_ThrowsArgumentNullException() + { + // Setup + var windDirection = new TestWindDirection(); + + // Call + TestDelegate call = () => new GeneralResultSubMechanismIllustrationPoint(windDirection, + null, + Enumerable.Empty()); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("stochasts", paramName); + } + + [Test] + public void Constructor_TopLevelSubMechanismIllustrationPointsNull_ThrowsArgumentNullException() + { + // Setup + var windDirection = new TestWindDirection(); + + // Call + TestDelegate call = () => new GeneralResultSubMechanismIllustrationPoint(windDirection, + Enumerable.Empty(), + null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("topLevelSubMechanismIllustrationPoints", paramName); + } + + [Test] + public void Constructor_ValidArguments_ExpectedProperties() + { + // Setup + var windDirection = new TestWindDirection(); + IEnumerable stochasts = Enumerable.Empty(); + IEnumerable combinations = + Enumerable.Empty(); + + // Call + var generalResult = new GeneralResultSubMechanismIllustrationPoint(windDirection, stochasts, combinations); + + // Assert + Assert.AreSame(windDirection, generalResult.GoverningWindDirection); + Assert.AreSame(stochasts, generalResult.Stochasts); + Assert.AreSame(combinations, generalResult.TopLevelSubMechanismIllustrationPoints); + } + } +} \ No newline at end of file Fisheye: Tag 8ba742d2139563c9571e32f074c7c4b3077f45ee refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -79,7 +79,7 @@ - + Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs (.../TestGeneralResultTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs (.../TestGeneralResultTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -32,10 +32,10 @@ public void Constructor_ExpectedProperties() { // Call - var generalResult = new TestGeneralResult(); + var generalResult = new TestGeneralResultSubMechanismIllustrationPoint(); // Assert - Assert.IsInstanceOf(generalResult); + Assert.IsInstanceOf(generalResult); AssertWindDirection(new TestWindDirection(), generalResult.GoverningWindDirection); CollectionAssert.IsEmpty(generalResult.Stochasts); CollectionAssert.IsEmpty(generalResult.TopLevelSubMechanismIllustrationPoints); Fisheye: Tag 8ba742d2139563c9571e32f074c7c4b3077f45ee refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestGeneralResult.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestGeneralResultSubMechanismIllustrationPoint.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestGeneralResultSubMechanismIllustrationPoint.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestGeneralResultSubMechanismIllustrationPoint.cs (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -0,0 +1,40 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Linq; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; + +namespace Ringtoets.Common.Data.TestUtil.IllustrationPoints +{ + /// + /// A simple general result which can be used for testing. + /// + public class TestGeneralResultSubMechanismIllustrationPoint : GeneralResultSubMechanismIllustrationPoint + { + /// + /// Creates a new instance of . + /// + public TestGeneralResultSubMechanismIllustrationPoint() + : base(new TestWindDirection(), + Enumerable.Empty(), + Enumerable.Empty()) {} + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -59,7 +59,7 @@ - + Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs (.../RingtoetsStackChartDataFactoryTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs (.../RingtoetsStackChartDataFactoryTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -46,21 +46,21 @@ } [Test] - public void CreateColumns_GeneralResultNull_ThrowArgumentNullException() + public void CreateColumns_GeneralResultSubMechanismIllustrationPointNull_ThrowArgumentNullException() { // Call TestDelegate test = () => RingtoetsStackChartDataFactory.CreateColumns(null, new StackChartData()); // Assert var exception = Assert.Throws(test); - Assert.AreEqual("generalResult", exception.ParamName); + Assert.AreEqual("generalResultSubMechanismIllustrationPoint", exception.ParamName); } [Test] public void CreateColumns_StackChartDataNull_ThrowArgumentNullException() { // Call - TestDelegate test = () => RingtoetsStackChartDataFactory.CreateColumns(new TestGeneralResult(), null); + TestDelegate test = () => RingtoetsStackChartDataFactory.CreateColumns(new TestGeneralResultSubMechanismIllustrationPoint(), null); // Assert var exception = Assert.Throws(test); @@ -73,7 +73,7 @@ // Setup var stackChartData = new StackChartData(); var windDirection = new TestWindDirection(); - var generalResult = new GeneralResult( + var generalResult = new GeneralResultSubMechanismIllustrationPoint( windDirection, Enumerable.Empty(), new[] @@ -110,7 +110,7 @@ var windDirection = new TestWindDirection(); var stackChartData = new StackChartData(); - var generalResult = new GeneralResult( + var generalResult = new GeneralResultSubMechanismIllustrationPoint( windDirection, Enumerable.Empty(), new[] @@ -138,21 +138,21 @@ } [Test] - public void CreateRows_GeneralResultNull_ThrowArgumentNullException() + public void CreateRows_GeneralResultSubMechanismIllustrationPointNull_ThrowArgumentNullException() { // Call TestDelegate test = () => RingtoetsStackChartDataFactory.CreateRows(null, new StackChartData()); // Assert var exception = Assert.Throws(test); - Assert.AreEqual("generalResult", exception.ParamName); + Assert.AreEqual("generalResultSubMechanismIllustrationPoint", exception.ParamName); } [Test] public void CreateRows_StackChartDataNull_ThrowArgumentNullException() { // Call - TestDelegate test = () => RingtoetsStackChartDataFactory.CreateRows(new TestGeneralResult(), null); + TestDelegate test = () => RingtoetsStackChartDataFactory.CreateRows(new TestGeneralResultSubMechanismIllustrationPoint(), null); // Assert var exception = Assert.Throws(test); @@ -163,7 +163,7 @@ public void CreateRows_WithAllData_RowsAddedToStackChartData() { var stackChartData = new StackChartData(); - var generalResult = new GeneralResult( + var generalResult = new GeneralResultSubMechanismIllustrationPoint( new TestWindDirection(), Enumerable.Empty(), new[] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs =================================================================== diff -u -r152ba6203dc5ff26a7848b40bac675b3fe5d7f29 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs (.../HydraulicBoundaryLocationsViewTest.cs) (revision 152ba6203dc5ff26a7848b40bac675b3fe5d7f29) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/HydraulicBoundaryLocationsViewTest.cs (.../HydraulicBoundaryLocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -275,7 +275,7 @@ throw new NotImplementedException(); } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { return null; } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs (.../IllustrationPointsChartControlTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs (.../IllustrationPointsChartControlTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -55,7 +55,7 @@ var chartControl = new IllustrationPointsChartControl(); // When - chartControl.Data = GetGerenalResult(); + chartControl.Data = GetGeneralResult(); // Then IStackChartControl chart = chartControl.Controls.OfType().Single(); @@ -101,7 +101,7 @@ // Given var chartControl = new IllustrationPointsChartControl { - Data = GetGerenalResult() + Data = GetGeneralResult() }; // When @@ -119,7 +119,7 @@ // Given var chartControl = new IllustrationPointsChartControl { - Data = GetGerenalResult() + Data = GetGeneralResult() }; // Precondition @@ -129,7 +129,7 @@ Assert.AreEqual(3, chart.Data.Rows.Count()); // When - chartControl.Data = new GeneralResult( + chartControl.Data = new GeneralResultSubMechanismIllustrationPoint( new TestWindDirection(), Enumerable.Empty(), new[] @@ -164,9 +164,9 @@ Assert.AreEqual("Stochast 4", rows[1].Name); } - private static GeneralResult GetGerenalResult() + private static GeneralResultSubMechanismIllustrationPoint GetGeneralResult() { - return new GeneralResult( + return new GeneralResultSubMechanismIllustrationPoint( new TestWindDirection(), Enumerable.Empty(), new[] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs =================================================================== diff -u -r82beae540257b0a91094838c1a020d043431a93a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs (.../IllustrationPointsControlTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs (.../IllustrationPointsControlTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -57,7 +57,7 @@ public void Data_ValueSet_DataSetToIllustrationPointsChartControl() { // Setup - var data = new TestGeneralResult(); + var data = new TestGeneralResultSubMechanismIllustrationPoint(); var control = new IllustrationPointsControl(); var chartControl = (IllustrationPointsChartControl) control.Controls.Find("IllustrationPointsChartControl", true).Single(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsTableControlTest.cs =================================================================== diff -u -re26905cfcf52dad59c74508605103c8cf9336d3d -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsTableControlTest.cs (.../IllustrationPointsTableControlTest.cs) (revision e26905cfcf52dad59c74508605103c8cf9336d3d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsTableControlTest.cs (.../IllustrationPointsTableControlTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -97,7 +97,7 @@ public void Data_SetNewValue_DataGridViewCorrectlyInitialized() { // Setup - GeneralResult data = GetGerenalResult(); + GeneralResultSubMechanismIllustrationPoint data = GetGeneralResult(); IllustrationPointsTableControl control = ShowControl(); // Call @@ -128,7 +128,7 @@ public void Data_SetToNull_DataGridViewCleared() { // Setup - GeneralResult data = GetGerenalResult(); + GeneralResultSubMechanismIllustrationPoint data = GetGeneralResult(); IllustrationPointsTableControl control = ShowControl(); control.Data = data; @@ -155,9 +155,9 @@ return control; } - private static GeneralResult GetGerenalResult() + private static GeneralResultSubMechanismIllustrationPoint GetGeneralResult() { - return new GeneralResult( + return new GeneralResultSubMechanismIllustrationPoint( new TestWindDirection(), Enumerable.Empty(), new[] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs =================================================================== diff -u -ra09a8d55dd24812784b22dd4a0f64e605ebc390a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs (.../LocationsViewTest.cs) (revision a09a8d55dd24812784b22dd4a0f64e605ebc390a) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs (.../LocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -322,7 +322,7 @@ .Select(row => row.CalculatableObject); } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { return null; } Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/CreateGeneralResultSubmechanismIllustrationPointConverterTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/CreateGeneralResultSubmechanismIllustrationPointConverterTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/CreateGeneralResultSubmechanismIllustrationPointConverterTest.cs (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -0,0 +1,185 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Service.IllustrationPoints; +using HydraRingGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult; +using HydraRingWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; +using HydraRingStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; +using HydraRingWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; +using HydraRingIllustrationPointTreeNode = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointTreeNode; +using HydraRingCombinationType = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.CombinationType; +using HydraRingIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; +using HydraRingFaultTreeIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.FaultTreeIllustrationPoint; +using HydraRingSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; + +namespace Ringtoets.Common.Service.Test.IllustrationPoints +{ + [TestFixture] + public class CreateGeneralResultSubmechanismIllustrationPointConverterTest + { + [Test] + public void CreateGeneralResultSubmechanismIllustrationPoint_HydraRingGeneralResultNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("hydraRingGeneralResult", paramName); + } + + [Test] + public void CreateGeneralResultSubmechanismIllustrationPoint_HydraGeneralResultWithoutIllustrationPoints_ExpectedProperties() + { + // Setup + var random = new Random(21); + double angle = random.NextDouble(); + var hydraGoverningWindDirection = new HydraRingWindDirection("Name", angle); + + var hydraRingGeneralResult = + new HydraRingGeneralResult(random.NextDouble(), + hydraGoverningWindDirection, + Enumerable.Empty(), + new Dictionary< + HydraRingWindDirectionClosingSituation, + HydraRingIllustrationPointTreeNode>()); + + // Call + GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint = + GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraRingGeneralResult); + + // Assert + AssertWindDirection(hydraGoverningWindDirection, generalResultSubMechanismIllustrationPoint.GoverningWindDirection); + CollectionAssert.IsEmpty(generalResultSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoints); + CollectionAssert.IsEmpty(generalResultSubMechanismIllustrationPoint.Stochasts); + } + + [Test] + public void CreateGeneralResultSubmechanismIllustrationPoint_HydraGeneralResultWithSubMechanismIllustrationPointsOnly_ExpectedProperties() + { + // Setup + const string closingSituation = "Closing situation"; + + var random = new Random(21); + double windDirectionAngle = random.NextDouble(); + var hydraRingWindDirection = new HydraRingWindDirection("SSE", windDirectionAngle); + var hydraRingWindDirectionClosingSituation = + new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, closingSituation); + + double beta = random.NextDouble(); + var hydraRingIllustrationPoint = + new HydraRingSubMechanismIllustrationPoint("Illustration Point", + Enumerable.Empty(), + Enumerable.Empty(), + beta); + var hydraRingIllustrationTreeNode = new HydraRingIllustrationPointTreeNode(hydraRingIllustrationPoint); + + double governingWindDirectionAngle = random.NextDouble(); + var governingHydraWindDirection = new HydraRingWindDirection("Name", governingWindDirectionAngle); + var hydraGeneralResult = + new HydraRingGeneralResult(random.NextDouble(), + governingHydraWindDirection, + Enumerable.Empty(), + new Dictionary + { + { + hydraRingWindDirectionClosingSituation, hydraRingIllustrationTreeNode + } + }); + + // Call + GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint = + GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraGeneralResult); + + // Assert + WindDirection generalResultGoverningWindDirection = generalResultSubMechanismIllustrationPoint.GoverningWindDirection; + AssertWindDirection(governingHydraWindDirection, generalResultGoverningWindDirection); + + CollectionAssert.IsEmpty(generalResultSubMechanismIllustrationPoint.Stochasts); + + TopLevelSubMechanismIllustrationPoint combination = generalResultSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoints.Single(); + AssertWindDirection(hydraRingWindDirection, combination.WindDirection); + Assert.AreEqual(closingSituation, combination.ClosingSituation); + + SubMechanismIllustrationPoint subMechanismIllustrationPoint = combination.SubMechanismIllustrationPoint; + Assert.AreEqual(hydraRingIllustrationPoint.Name, subMechanismIllustrationPoint.Name); + Assert.AreEqual(hydraRingIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta.GetAccuracy()); + CollectionAssert.IsEmpty(subMechanismIllustrationPoint.Stochasts); + CollectionAssert.IsEmpty(subMechanismIllustrationPoint.IllustrationPointResults); + } + + [Test] + public void CreateGeneralResultSubmechanismIllustrationPoint_HydraRingGeneralResultWithFaultTreeIllustrationPointsOnly_ExpectedProperties() + { + // Setup + var random = new Random(21); + + const string closingSituation = "Closing situation"; + double windDirectionAngle = random.NextDouble(); + var hydraRingWindDirection = new HydraRingWindDirection("SSE", windDirectionAngle); + var hydraRingWindDirectionClosingSituation = + new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, closingSituation); + + var hydraRingIllustrationPoint = + new HydraRingFaultTreeIllustrationPoint(" IllustrationPoint", + random.NextDouble(), + random.NextEnumValue()); + var hydraRingIllustrationTreeNode = new HydraRingIllustrationPointTreeNode(hydraRingIllustrationPoint); + + double governingWindDirectionAngle = random.NextDouble(); + var governingHydraRingWindDirection = new HydraRingWindDirection("Name", governingWindDirectionAngle); + var hydraRingGeneralResult = + new HydraRingGeneralResult(random.NextDouble(), + governingHydraRingWindDirection, + Enumerable.Empty(), + new Dictionary + { + { + hydraRingWindDirectionClosingSituation, hydraRingIllustrationTreeNode + } + }); + + // Call + GeneralResultSubMechanismIllustrationPoint generalResultSubMechanismIllustrationPoint = + GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraRingGeneralResult); + + // Assert + WindDirection generalResultGoverningWindDirection = generalResultSubMechanismIllustrationPoint.GoverningWindDirection; + AssertWindDirection(governingHydraRingWindDirection, generalResultGoverningWindDirection); + CollectionAssert.IsEmpty(generalResultSubMechanismIllustrationPoint.Stochasts); + CollectionAssert.IsEmpty(generalResultSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoints); + } + + private static void AssertWindDirection(HydraRingWindDirection hydraRingWindDirection, WindDirection windDirection) + { + Assert.AreEqual(hydraRingWindDirection.Name, windDirection.Name); + Assert.AreEqual(hydraRingWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); + } + } +} \ No newline at end of file Fisheye: Tag 8ba742d2139563c9571e32f074c7c4b3077f45ee refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/Ringtoets.Common.Service.Test.csproj =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/Ringtoets.Common.Service.Test.csproj (.../Ringtoets.Common.Service.Test.csproj) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/Ringtoets.Common.Service.Test.csproj (.../Ringtoets.Common.Service.Test.csproj) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -65,7 +65,7 @@ - + Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.cs =================================================================== diff -u -r6cdf02ac497b3bab4f7f955efac588545f5b8986 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.cs) (revision 6cdf02ac497b3bab4f7f955efac588545f5b8986) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -136,12 +136,12 @@ } } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { if (data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.HasOutput && data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.HasIllustrationPoints) { - return data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.GeneralResult; + return data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.GeneralResultSubMechanismIllustrationPoint; } return null; } Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextProperties.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextProperties.cs (.../GrassCoverErosionOutwardsHydraulicBoundaryLocationContextProperties.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextProperties.cs (.../GrassCoverErosionOutwardsHydraulicBoundaryLocationContextProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -117,7 +117,7 @@ { get { - return GetGeneralIllustrationPointsResult().GoverningWindDirection.Name; + return GetGeneralResultSubMechanismIllustrationPoints().GoverningWindDirection.Name; } } @@ -132,7 +132,7 @@ { get { - return GetGeneralIllustrationPointsResult().Stochasts.ToArray(); + return GetGeneralResultSubMechanismIllustrationPoints().Stochasts.ToArray(); } } @@ -147,7 +147,7 @@ { get { - return GetGeneralIllustrationPointsResult().Stochasts.ToArray(); + return GetGeneralResultSubMechanismIllustrationPoints().Stochasts.ToArray(); } } @@ -161,7 +161,7 @@ { get { - return GetGeneralIllustrationPointsResult() + return GetGeneralResultSubMechanismIllustrationPoints() .TopLevelSubMechanismIllustrationPoints .Select(p => new TopLevelSubMechanismIllustrationPointProperties { @@ -184,7 +184,7 @@ [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { - bool hasGeneralIllustrationPointsResult = GetGeneralIllustrationPointsResult() != null; + bool hasGeneralIllustrationPointsResult = GetGeneralResultSubMechanismIllustrationPoints() != null; if (propertyName == nameof(GoverningWindDirection) || propertyName == nameof(AlphaValues) || propertyName == nameof(Durations) @@ -206,7 +206,7 @@ /// /// The general illustration points if it has obtained as part of the calculation, null /// otherwise. - protected abstract GeneralResult GetGeneralIllustrationPointsResult(); + protected abstract GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints(); public class ConstructionProperties { Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextProperties.cs =================================================================== diff -u -r6cdf02ac497b3bab4f7f955efac588545f5b8986 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextProperties.cs) (revision 6cdf02ac497b3bab4f7f955efac588545f5b8986) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -136,12 +136,12 @@ } } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { if (data.HydraulicBoundaryLocation.WaveHeightCalculation.HasOutput && data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.HasIllustrationPoints) { - return data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.GeneralResult; + return data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.GeneralResultSubMechanismIllustrationPoint; } return null; } Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -154,7 +154,7 @@ return base.ValidateCalculatableObjects(); } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; if (currentRow == null) @@ -166,7 +166,7 @@ return location.DesignWaterLevelCalculation.HasOutput && location.DesignWaterLevelCalculation.Output.HasIllustrationPoints - ? location.DesignWaterLevelCalculation.Output.GeneralResult + ? location.DesignWaterLevelCalculation.Output.GeneralResultSubMechanismIllustrationPoint : null; } Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -161,7 +161,7 @@ return base.ValidateCalculatableObjects(); } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; if (currentRow == null) @@ -173,7 +173,7 @@ return location.WaveHeightCalculation.HasOutput && location.WaveHeightCalculation.Output.HasIllustrationPoints - ? location.WaveHeightCalculation.Output.GeneralResult + ? location.WaveHeightCalculation.Output.GeneralResultSubMechanismIllustrationPoint : null; } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -136,7 +136,7 @@ if (withIllustrationPoints) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResultSubMechanismIllustrationPoint(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextPropertiesTest.cs =================================================================== diff -u -r6cdf02ac497b3bab4f7f955efac588545f5b8986 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsHydraulicBoundaryLocationContextPropertiesTest.cs) (revision 6cdf02ac497b3bab4f7f955efac588545f5b8986) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsHydraulicBoundaryLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsHydraulicBoundaryLocationContextPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -271,9 +271,9 @@ public bool WithGeneralResult; - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { - return WithGeneralResult ? new TestGeneralResult() : null; + return WithGeneralResult ? new TestGeneralResultSubMechanismIllustrationPoint() : null; } } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -136,7 +136,7 @@ if (withIllustrationPoints) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResultSubMechanismIllustrationPoint(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r82beae540257b0a91094838c1a020d043431a93a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -500,7 +500,7 @@ Assert.IsNull(illustrationPointsControl.Data); var output = new TestHydraulicBoundaryLocationOutput(1); - var result = new TestGeneralResult(); + var result = new TestGeneralResultSubMechanismIllustrationPoint(); output.SetIllustrationPoints(result); var locations = (ObservableList) view.Data; @@ -528,7 +528,7 @@ GrassCoverErosionOutwardsDesignWaterLevelLocationsView view = ShowDesignWaterLevelLocationsView(); var output = new TestHydraulicBoundaryLocationOutput(1.01); - output.SetIllustrationPoints(new TestGeneralResult()); + output.SetIllustrationPoints(new TestGeneralResultSubMechanismIllustrationPoint()); view.Data = new ObservableList { new HydraulicBoundaryLocation(1, "1", 1.0, 1.0), Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -r82beae540257b0a91094838c1a020d043431a93a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -495,7 +495,7 @@ Assert.IsNull(illustrationPointsControl.Data); var output = new TestHydraulicBoundaryLocationOutput(1); - var result = new TestGeneralResult(); + var result = new TestGeneralResultSubMechanismIllustrationPoint(); output.SetIllustrationPoints(result); var locations = (ObservableList) view.Data; @@ -523,7 +523,7 @@ GrassCoverErosionOutwardsWaveHeightLocationsView view = ShowWaveHeightLocationsView(); var output = new TestHydraulicBoundaryLocationOutput(1.01); - output.SetIllustrationPoints(new TestGeneralResult()); + output.SetIllustrationPoints(new TestGeneralResultSubMechanismIllustrationPoint()); var locations = new ObservableList { new HydraulicBoundaryLocation(1, "1", 1.0, 1.0), Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationContextProperties.cs =================================================================== diff -u -rb14f45e3735bbdde95f710bf396a85326eb388d5 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationContextProperties.cs (.../DesignWaterLevelLocationContextProperties.cs) (revision b14f45e3735bbdde95f710bf396a85326eb388d5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationContextProperties.cs (.../DesignWaterLevelLocationContextProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -133,12 +133,12 @@ } } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { if (data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.HasOutput && data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.HasIllustrationPoints) { - return data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.GeneralResult; + return data.HydraulicBoundaryLocation.DesignWaterLevelCalculation.Output.GeneralResultSubMechanismIllustrationPoint; } return null; } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -95,7 +95,7 @@ [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { - bool hasGeneralIllustrationPointsResult = GetGeneralIllustrationPointsResult() != null; + bool hasGeneralIllustrationPointsResult = GetGeneralResultSubMechanismIllustrationPoints() != null; if (propertyName == nameof(GoverningWindDirection) || propertyName == nameof(AlphaValues) || propertyName == nameof(Durations) @@ -152,7 +152,7 @@ { get { - return GetGeneralIllustrationPointsResult().GoverningWindDirection.Name; + return GetGeneralResultSubMechanismIllustrationPoints().GoverningWindDirection.Name; } } @@ -167,7 +167,7 @@ { get { - return GetGeneralIllustrationPointsResult().Stochasts.ToArray(); + return GetGeneralResultSubMechanismIllustrationPoints().Stochasts.ToArray(); } } @@ -182,7 +182,7 @@ { get { - return GetGeneralIllustrationPointsResult().Stochasts.ToArray(); + return GetGeneralResultSubMechanismIllustrationPoints().Stochasts.ToArray(); } } @@ -196,7 +196,7 @@ { get { - return GetGeneralIllustrationPointsResult() + return GetGeneralResultSubMechanismIllustrationPoints() .TopLevelSubMechanismIllustrationPoints .Select(p => new TopLevelSubMechanismIllustrationPointProperties { @@ -207,11 +207,11 @@ } /// - /// Gets the general illustration points result. + /// Gets the general result with the submec illustration points result. /// /// The general illustration points if it has obtained as part of the calculation, null /// otherwise. - protected abstract GeneralResult GetGeneralIllustrationPointsResult(); + protected abstract GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints(); public override string ToString() { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationContextProperties.cs =================================================================== diff -u -r6cdf02ac497b3bab4f7f955efac588545f5b8986 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationContextProperties.cs (.../WaveHeightLocationContextProperties.cs) (revision 6cdf02ac497b3bab4f7f955efac588545f5b8986) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationContextProperties.cs (.../WaveHeightLocationContextProperties.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -134,12 +134,12 @@ } } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { if (data.HydraulicBoundaryLocation.WaveHeightCalculation.HasOutput && data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.HasIllustrationPoints) { - return data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.GeneralResult; + return data.HydraulicBoundaryLocation.WaveHeightCalculation.Output.GeneralResultSubMechanismIllustrationPoint; } return null; } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -116,7 +116,7 @@ base.Dispose(disposing); } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; if (currentRow == null) @@ -128,7 +128,7 @@ return location.DesignWaterLevelCalculation.HasOutput && location.DesignWaterLevelCalculation.Output.HasIllustrationPoints - ? location.DesignWaterLevelCalculation.Output.GeneralResult + ? location.DesignWaterLevelCalculation.Output.GeneralResultSubMechanismIllustrationPoint : null; } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -98,7 +98,7 @@ } } - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; if (currentRow == null) @@ -110,7 +110,7 @@ return location.WaveHeightCalculation.HasOutput && location.WaveHeightCalculation.Output.HasIllustrationPoints - ? location.WaveHeightCalculation.Output.GeneralResult + ? location.WaveHeightCalculation.Output.GeneralResultSubMechanismIllustrationPoint : null; } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -140,7 +140,7 @@ if (withIllustrationPoints) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResultSubMechanismIllustrationPoint(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs =================================================================== diff -u -r6cdf02ac497b3bab4f7f955efac588545f5b8986 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 6cdf02ac497b3bab4f7f955efac588545f5b8986) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -253,9 +253,9 @@ public bool WithGeneralResult; - protected override GeneralResult GetGeneralIllustrationPointsResult() + protected override GeneralResultSubMechanismIllustrationPoint GetGeneralResultSubMechanismIllustrationPoints() { - return WithGeneralResult ? new TestGeneralResult() : null; + return WithGeneralResult ? new TestGeneralResultSubMechanismIllustrationPoint() : null; } } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -143,7 +143,7 @@ if (withIllustrationPoints) { - hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResultSubMechanismIllustrationPoint(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -398,7 +398,7 @@ Assert.IsNull(illustrationPointsControl.Data); var output = new TestHydraulicBoundaryLocationOutput(1); - var result = new TestGeneralResult(); + var result = new TestGeneralResultSubMechanismIllustrationPoint(); output.SetIllustrationPoints(result); // Call @@ -463,7 +463,7 @@ } }); var output = new TestHydraulicBoundaryLocationOutput(1.01); - output.SetIllustrationPoints(new TestGeneralResult()); + output.SetIllustrationPoints(new TestGeneralResultSubMechanismIllustrationPoint()); Locations.Add(new HydraulicBoundaryLocation(5, "5", 5.0, 5.0) { DesignWaterLevelCalculation = Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r82beae540257b0a91094838c1a020d043431a93a -r8ba742d2139563c9571e32f074c7c4b3077f45ee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee) @@ -389,7 +389,7 @@ Assert.IsNull(illustrationPointsControl.Data); var output = new TestHydraulicBoundaryLocationOutput(1); - var result = new TestGeneralResult(); + var result = new TestGeneralResultSubMechanismIllustrationPoint(); output.SetIllustrationPoints(result); // Call @@ -454,7 +454,7 @@ } }); var output = new TestHydraulicBoundaryLocationOutput(1.01); - output.SetIllustrationPoints(new TestGeneralResult()); + output.SetIllustrationPoints(new TestGeneralResultSubMechanismIllustrationPoint()); Locations.Add(new HydraulicBoundaryLocation(5, "5", 5.0, 5.0) { WaveHeightCalculation =