Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationPropertiesTest.cs =================================================================== diff -u -r4eb3b5296acb1944201b09eb87e26584ec473b33 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationPropertiesTest.cs (.../DuneLocationPropertiesTest.cs) (revision 4eb3b5296acb1944201b09eb87e26584ec473b33) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationPropertiesTest.cs (.../DuneLocationPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -1,4 +1,25 @@ -using System; +// Copyright (C) Stichting Deltares 2016. 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.ComponentModel; using Core.Common.Base.Geometry; using Core.Common.TestUtil; @@ -73,10 +94,7 @@ } [Test] - [TestCase(CalculationConvergence.CalculatedNotConverged)] - [TestCase(CalculationConvergence.CalculatedConverged)] - [TestCase(CalculationConvergence.NotCalculated)] - public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues(CalculationConvergence convergence) + public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues() { // Setup const long id = 1234L; @@ -86,6 +104,7 @@ var random = new Random(); int coastalAreaId = random.Next(); + CalculationConvergence convergence = random.NextEnumValue(); double offset = random.NextDouble(); double orientation = random.NextDouble(); double d50 = random.NextDouble(); Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs =================================================================== diff -u -r1930dd0513dd2e649905034334d8896d36640c7b -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs (.../DuneLocationsContextPropertiesTest.cs) (revision 1930dd0513dd2e649905034334d8896d36640c7b) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs (.../DuneLocationsContextPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -1,4 +1,25 @@ -using System.ComponentModel; +// Copyright (C) Stichting Deltares 2016. 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.ComponentModel; using System.Linq; using Core.Common.Base; using Core.Common.Gui.Converters; @@ -30,13 +51,9 @@ mockRepository.ReplayAll(); var location = new TestDuneLocation(); - var items = new ObservableList - { - location - }; - var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(items, failureMechanism, assessmentSection); + failureMechanism.DuneLocations.Add(location); + var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); // Call var properties = new DuneLocationsContextProperties Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -69,7 +69,7 @@ public void Data_SetNewInputContextInstance_ReturnCorrectPropertyValues() { // Setup - var random = new Random(21); + var random = new Random(); double waveHeight = random.NextDouble(); bool isOvertoppingDominant = Convert.ToBoolean(random.Next(0, 2)); double requiredProbability = random.NextDouble(); @@ -82,7 +82,7 @@ double dikeHeightTargetReliability = random.NextDouble(); double dikeHeightCalculatedProbability = random.NextDouble(); double dikeHeightCalculatedReliability = random.NextDouble(); - var dikeHeightConvergence = CalculationConvergence.NotCalculated; + var dikeHeightConvergence = random.NextEnumValue(); var probabilityAssessmentOutput = new ProbabilityAssessmentOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety); var dikeHeightAssessmentOutput = new DikeHeightAssessmentOutput(dikeHeight, dikeHeightTargetProbability, dikeHeightTargetReliability, dikeHeightCalculatedProbability, dikeHeightCalculatedReliability, dikeHeightConvergence); var output = new GrassCoverErosionInwardsOutput(waveHeight, isOvertoppingDominant, probabilityAssessmentOutput, dikeHeightAssessmentOutput); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -100,10 +100,7 @@ } [Test] - [TestCase(CalculationConvergence.CalculatedConverged)] - [TestCase(CalculationConvergence.CalculatedNotConverged)] - [TestCase(CalculationConvergence.NotCalculated)] - public void GetProperties_FullyConfiguredLocation_ReturnsExpected(CalculationConvergence convergence) + public void GetProperties_FullyConfiguredLocation_ReturnsExpected() { // Setup var random = new Random(); @@ -117,6 +114,7 @@ double calculatedProbability = random.NextDouble(); double calculatedReliability = random.NextDouble(); double designWaterLevel = random.NextDouble(); + CalculationConvergence convergence = random.NextEnumValue(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -100,10 +100,7 @@ } [Test] - [TestCase(CalculationConvergence.CalculatedConverged)] - [TestCase(CalculationConvergence.CalculatedNotConverged)] - [TestCase(CalculationConvergence.NotCalculated)] - public void GetProperties_FullyConfiguredLocation_ReturnsExpectedValues(CalculationConvergence convergence) + public void GetProperties_FullyConfiguredLocation_ReturnsExpectedValues() { // Setup var random = new Random(); @@ -117,6 +114,7 @@ double calculatedProbability = random.NextDouble(); double calculatedReliability = random.NextDouble(); double waveHeight = random.NextDouble(); + var convergence = random.NextEnumValue(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -103,10 +103,7 @@ } [Test] - [TestCase(CalculationConvergence.CalculatedNotConverged)] - [TestCase(CalculationConvergence.CalculatedConverged)] - [TestCase(CalculationConvergence.NotCalculated)] - public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues(CalculationConvergence convergence) + public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues() { // Setup var random = new Random(); @@ -120,6 +117,7 @@ double calculatedProbability = random.NextDouble(); double calculatedReliability = random.NextDouble(); double designWaterLevel = random.NextDouble(); + var convergence = random.NextEnumValue(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -102,10 +102,7 @@ } [Test] - [TestCase(CalculationConvergence.CalculatedNotConverged)] - [TestCase(CalculationConvergence.CalculatedConverged)] - [TestCase(CalculationConvergence.NotCalculated)] - public void GetProperties_ValidWaveHeight_ReturnsExpectedValues(CalculationConvergence convergence) + public void GetProperties_ValidWaveHeight_ReturnsExpectedValues() { // Setup var random = new Random(); @@ -119,6 +116,7 @@ double calculatedProbability = random.NextDouble(); double calculatedReliability = random.NextDouble(); double waveHeight = random.NextDouble(); + var convergence = random.NextEnumValue(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsOutputPropertiesTest.cs =================================================================== diff -u -r08aceaa9a775610776b9014046b3acabea2447d1 -r24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsOutputPropertiesTest.cs (.../WaveConditionsOutputPropertiesTest.cs) (revision 08aceaa9a775610776b9014046b3acabea2447d1) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsOutputPropertiesTest.cs (.../WaveConditionsOutputPropertiesTest.cs) (revision 24a8c1ddd38f7fc1c9c095c1be8e96a0ae89ae58) @@ -60,7 +60,7 @@ const double targetReliability = 3000; const double calculatedProbability = 0.4; const double calculatedReliability = 6000; - const CalculationConvergence convergence = CalculationConvergence.NotCalculated; + CalculationConvergence convergence = new Random().NextEnumValue(); // Call var properties = new WaveConditionsOutputProperties