Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/CategoryPlotViewTest.cs =================================================================== diff -u -r095b567e3a7a0e61dd92b0e68fc6f5db883ebcdd -r82beae540257b0a91094838c1a020d043431a93a --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/CategoryPlotViewTest.cs (.../CategoryPlotViewTest.cs) (revision 095b567e3a7a0e61dd92b0e68fc6f5db883ebcdd) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/CategoryPlotViewTest.cs (.../CategoryPlotViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -127,6 +127,21 @@ } [Test] + public void AddLabel_EmptyLabels_AbsoluteMaximumSet() + { + // Setup + var plotView = new CategoryPlotView(); + + // Call + plotView.AddLabels(Enumerable.Empty()); + + // Assert + CategoryAxis axis = plotView.Model.Axes.OfType().First(); + Assert.AreEqual(0, axis.Labels.Count); + Assert.AreEqual(0, axis.AbsoluteMaximum); + } + + [Test] public void ClearLabels_Always_LabelsCleared() { // Setup Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs =================================================================== diff -u -reb404dacf85af00969cfd2b64da6e630b2c49ba4 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs (.../RingtoetsStackChartDataFactory.cs) (revision eb404dacf85af00969cfd2b64da6e630b2c49ba4) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs (.../RingtoetsStackChartDataFactory.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -76,7 +76,9 @@ if (showClosingSituation) { - columnName = $"{columnName} ({label.Item2})"; + columnName = string.Format(Resources.RingtoetsStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1, + columnName, + label.Item2); } stackChartData.AddColumn(columnName); @@ -115,9 +117,9 @@ CreateRowsForStochasts(stackChartData, stochasts); } - private static IDictionary> CreateStochastsLookup(List> stochastValues) + private static IDictionary> CreateStochastsLookup(IEnumerable> stochastValues) { - IDictionary> lookup = new Dictionary>(); + var lookup = new Dictionary>(); foreach (Tuple stochastValue in stochastValues) { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rd338c022bac7833bc0eb3b8bd7b37f74d82df1f8 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d338c022bac7833bc0eb3b8bd7b37f74d82df1f8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -2086,6 +2086,15 @@ } /// + /// Looks up a localized string similar to {0} ({1}). + /// + public static string RingtoetsStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1 { + get { + return ResourceManager.GetString("RingtoetsStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Overig. /// public static string RingtoetsStackChartDataFactory_RemainingRow_DisplayName { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -rd338c022bac7833bc0eb3b8bd7b37f74d82df1f8 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision d338c022bac7833bc0eb3b8bd7b37f74d82df1f8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -1050,4 +1050,7 @@ Berekende beta + + {0} ({1}) + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -r152ba6203dc5ff26a7848b40bac675b3fe5d7f29 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 152ba6203dc5ff26a7848b40bac675b3fe5d7f29) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -38,10 +38,8 @@ - - Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs =================================================================== diff -u -r13d9407c89466e20fe912bb64d078358f8d03afc -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 13d9407c89466e20fe912bb64d078358f8d03afc) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -23,7 +23,6 @@ using System.Linq; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Forms.GuiServices; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs =================================================================== diff -u -r152ba6203dc5ff26a7848b40bac675b3fe5d7f29 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs (.../IllustrationPointsControl.cs) (revision 152ba6203dc5ff26a7848b40bac675b3fe5d7f29) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/IllustrationPointsControl.cs (.../IllustrationPointsControl.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -32,7 +32,7 @@ private GeneralResult data; /// - /// Creates a new instance of .s + /// Creates a new instance of . /// public IllustrationPointsControl() { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.Designer.cs =================================================================== diff -u -r866ec3eca626e872aa2f46b2134f1504920f3098 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.Designer.cs (.../LocationsView.Designer.cs) (revision 866ec3eca626e872aa2f46b2134f1504920f3098) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/LocationsView.Designer.cs (.../LocationsView.Designer.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -19,8 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Drawing; - namespace Ringtoets.Common.Forms.Views { partial class LocationsView @@ -69,7 +67,6 @@ // CalculateForSelectedButton // this.CalculateForSelectedButton.Enabled = false; - this.CalculateForSelectedButtonErrorProvider.SetIconPadding(this.CalculateForSelectedButton, 2); this.CalculateForSelectedButton.Location = new System.Drawing.Point(227, 29); this.CalculateForSelectedButton.Name = "CalculateForSelectedButton"; this.CalculateForSelectedButton.Size = new System.Drawing.Size(207, 23); @@ -110,6 +107,7 @@ // // CalculateForSelectedButtonErrorProvider // + this.CalculateForSelectedButtonErrorProvider.SetIconPadding(this.CalculateForSelectedButton, 2); this.CalculateForSelectedButtonErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; this.CalculateForSelectedButtonErrorProvider.ContainerControl = this; this.CalculateForSelectedButtonErrorProvider.Icon = global::Ringtoets.Common.Forms.Properties.Resources.warning; Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointStochastTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointStochastTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointStochastTest.cs (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -0,0 +1,47 @@ +// 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 NUnit.Framework; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; + +namespace Ringtoets.Common.Data.TestUtil.Test.IllustrationPoints +{ + [TestFixture] + public class TestSubMechanismIllustrationPointStochastTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + const string name = "stochast"; + const double alpha = 0.9; + + // Call + var stochast = new TestSubMechanismIllustrationPointStochast(name, alpha); + + // Assert + Assert.AreEqual(name, stochast.Name); + Assert.AreEqual(alpha, stochast.Alpha); + Assert.AreEqual(1, stochast.Duration, stochast.Duration.GetAccuracy()); + Assert.AreEqual(3, stochast.Realization, stochast.Realization.GetAccuracy()); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj =================================================================== diff -u -rbc298d659aee58c83cabc8094b0404e08dca5aca -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision bc298d659aee58c83cabc8094b0404e08dca5aca) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -56,6 +56,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPointStochast.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPointStochast.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPointStochast.cs (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -0,0 +1,39 @@ +// 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 Ringtoets.Common.Data.Hydraulics.IllustrationPoints; + +namespace Ringtoets.Common.Data.TestUtil.IllustrationPoints +{ + /// + /// A simple sub mechanism illustration point stochast which can be used for testing. + /// + public class TestSubMechanismIllustrationPointStochast : SubmechanismIllustrationPointStochast + { + /// + /// Creates a new instance of . + /// + /// The name of the stochast. + /// The alpha value of the stochast. + public TestSubMechanismIllustrationPointStochast(string name, double alpha) + : base(name, 1, alpha, 3) {} + } +} Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj =================================================================== diff -u -rbc298d659aee58c83cabc8094b0404e08dca5aca -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision bc298d659aee58c83cabc8094b0404e08dca5aca) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -60,6 +60,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs =================================================================== diff -u -reb404dacf85af00969cfd2b64da6e630b2c49ba4 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs (.../RingtoetsStackChartDataFactoryTest.cs) (revision eb404dacf85af00969cfd2b64da6e630b2c49ba4) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs (.../RingtoetsStackChartDataFactoryTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -72,19 +72,20 @@ { // Setup var stackChartData = new StackChartData(); + var windDirection = new TestWindDirection(); var generalResult = new GeneralResult( - new TestWindDirection(), + windDirection, Enumerable.Empty(), new[] { new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Regular", + windDirection, "Regular", new TestSubmechanismIllustrationPoint()), new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Regular", + windDirection, "Regular", new TestSubmechanismIllustrationPoint()), new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Regular", + windDirection, "Regular", new TestSubmechanismIllustrationPoint()) }); @@ -94,28 +95,34 @@ // Assert string[] columns = stackChartData.Columns.ToArray(); Assert.AreEqual(3, columns.Length); - Assert.AreEqual("SSE", columns[0]); - Assert.AreEqual("SSE", columns[1]); - Assert.AreEqual("SSE", columns[2]); + Assert.AreEqual(windDirection.Name, columns[0]); + Assert.AreEqual(windDirection.Name, columns[1]); + Assert.AreEqual(windDirection.Name, columns[2]); } [Test] public void CreateColumns_DifferentClosingSituations_ColumnsAddedToStackChartData() { + const string closingSituationRegular = "Regular"; + const string closingSituationClosed = "Closed"; + const string closingSituationOpen = "Open"; + + var windDirection = new TestWindDirection(); + var stackChartData = new StackChartData(); var generalResult = new GeneralResult( - new TestWindDirection(), + windDirection, Enumerable.Empty(), new[] { new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Regular", + windDirection, closingSituationRegular, new TestSubmechanismIllustrationPoint()), new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Closed", + windDirection, closingSituationClosed, new TestSubmechanismIllustrationPoint()), new TopLevelSubmechanismIllustrationPoint( - new TestWindDirection(), "Open", + windDirection, closingSituationOpen, new TestSubmechanismIllustrationPoint()) }); @@ -125,9 +132,9 @@ // Assert string[] columns = stackChartData.Columns.ToArray(); Assert.AreEqual(3, columns.Length); - Assert.AreEqual("SSE (Regular)", columns[0]); - Assert.AreEqual("SSE (Closed)", columns[1]); - Assert.AreEqual("SSE (Open)", columns[2]); + Assert.AreEqual($"{windDirection.Name} ({closingSituationRegular})", columns[0]); + Assert.AreEqual($"{windDirection.Name} ({closingSituationClosed})", columns[1]); + Assert.AreEqual($"{windDirection.Name} ({closingSituationOpen})", columns[2]); } [Test] @@ -166,35 +173,35 @@ new SubmechanismIllustrationPoint("Punt 1", new[] { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.01, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.01, 3), - new SubmechanismIllustrationPointStochast("Stochast 5", 1, -0.099, 3) + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.01), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.01), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.099) }, Enumerable.Empty(), 1)), new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 2", new[] { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.02, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.02, 3), - new SubmechanismIllustrationPointStochast("Stochast 5", 1, -0.9, 3) + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.02), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.02), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.9) }, Enumerable.Empty(), 1)), new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 3", new[] { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.03, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.03, 3), - new SubmechanismIllustrationPointStochast("Stochast 5", 1, -0.099, 3) + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.03), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.03), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.099) }, Enumerable.Empty(), 1)) }); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs =================================================================== diff -u -reb404dacf85af00969cfd2b64da6e630b2c49ba4 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs (.../IllustrationPointsChartControlTest.cs) (revision eb404dacf85af00969cfd2b64da6e630b2c49ba4) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsChartControlTest.cs (.../IllustrationPointsChartControlTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -137,28 +137,28 @@ new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 1", - new[] - { - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.43589, 3) - }, - Enumerable.Empty(), 1)), + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.43589) + }, + Enumerable.Empty(), 1)), new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 2", - new[] - { - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.9, 3) - }, - Enumerable.Empty(), 1)) + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.9) + }, + Enumerable.Empty(), 1)) }); // Then Assert.AreEqual(2, chart.Data.Columns.Count()); RowChartData[] rows = chart.Data.Rows.ToArray(); - Assert.AreEqual(2, rows.Length); + Assert.AreEqual(2, rows.Length); Assert.AreEqual("Stochast 3", rows[0].Name); Assert.AreEqual("Stochast 4", rows[1].Name); @@ -174,36 +174,36 @@ new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 1", - new[] - { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.01, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.01, 3) - }, - Enumerable.Empty(), 1)), + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.01), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.01) + }, + Enumerable.Empty(), 1)), new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 2", - new[] - { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.02, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.02, 3) - }, - Enumerable.Empty(), 1)), + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.02), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.02) + }, + Enumerable.Empty(), 1)), new TopLevelSubmechanismIllustrationPoint( new TestWindDirection(), "Regular", new SubmechanismIllustrationPoint("Punt 3", - new[] - { - new SubmechanismIllustrationPointStochast("Stochast 1", 1, -0.43589, 3), - new SubmechanismIllustrationPointStochast("Stochast 2", 1, -0.9, 3), - new SubmechanismIllustrationPointStochast("Stochast 3", 1, -0.03, 3), - new SubmechanismIllustrationPointStochast("Stochast 4", 1, -0.03, 3) - }, - Enumerable.Empty(), 1)) + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.03), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.03) + }, + Enumerable.Empty(), 1)) }); } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs =================================================================== diff -u -r152ba6203dc5ff26a7848b40bac675b3fe5d7f29 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs (.../IllustrationPointsControlTest.cs) (revision 152ba6203dc5ff26a7848b40bac675b3fe5d7f29) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/IllustrationPointsControlTest.cs (.../IllustrationPointsControlTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -63,7 +63,7 @@ var chartControl = (IllustrationPointsChartControl) control.Controls.Find("IllustrationPointsChartControl", true).Single(); var tableControl = (IllustrationPointsTableControl) control.Controls.Find("IllustrationPointsTableControl", true).Single(); - // Call + // Call control.Data = data; // Assert Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -490,9 +490,9 @@ { // Setup GrassCoverErosionOutwardsDesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(); - var illustrationPointsControl = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var illustrationPointsControl = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); dataGridView.SetCurrentCell(dataGridView.GetCell(3, 0)); @@ -503,8 +503,9 @@ var result = new TestGeneralResult(); output.SetIllustrationPoints(result); + var locations = (ObservableList) view.Data; + // Call - var locations = (ObservableList)view.Data; locations[3].DesignWaterLevelCalculation.Output = output; locations.NotifyObservers(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -485,9 +485,9 @@ { // Setup GrassCoverErosionOutwardsWaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(); - var illustrationPointsControl = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var illustrationPointsControl = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); dataGridView.SetCurrentCell(dataGridView.GetCell(3, 0)); @@ -498,8 +498,9 @@ var result = new TestGeneralResult(); output.SetIllustrationPoints(result); + var locations = (ObservableList) view.Data; + // Call - var locations = (ObservableList)view.Data; locations[3].WaveHeightCalculation.Output = output; locations.NotifyObservers(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -rd61395c0a62dbd3e563ad0d2942f544b2c5cc2e1 -r82beae540257b0a91094838c1a020d043431a93a --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision d61395c0a62dbd3e563ad0d2942f544b2c5cc2e1) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 82beae540257b0a91094838c1a020d043431a93a) @@ -110,9 +110,9 @@ { // Setup ShowFullyConfiguredWaveHeightLocationsView(); - var control = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var control = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); // Call dataGridView.SetCurrentCell(dataGridView.GetCell(0, 1)); @@ -126,9 +126,9 @@ { // Setup ShowFullyConfiguredWaveHeightLocationsView(); - var control = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var control = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); // Call dataGridView.SetCurrentCell(dataGridView.GetCell(1, 0)); @@ -142,9 +142,9 @@ { // Setup ShowFullyConfiguredWaveHeightLocationsView(); - var control = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var control = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); // Call dataGridView.SetCurrentCell(dataGridView.GetCell(4, 0)); @@ -379,9 +379,9 @@ { // Setup WaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(); - var illustrationPointsControl = (IllustrationPointsControl)testForm.Controls.Find("IllustrationPointsControl", true).Single(); + var illustrationPointsControl = (IllustrationPointsControl) testForm.Controls.Find("IllustrationPointsControl", true).Single(); - var dataGridView = (DataGridViewControl)testForm.Controls.Find("dataGridViewControl", true).First(); + var dataGridView = (DataGridViewControl) testForm.Controls.Find("dataGridViewControl", true).First(); dataGridView.SetCurrentCell(dataGridView.GetCell(3, 0));