Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs =================================================================== diff -u -ra6da010d4a68dbf5b4571ea39850ee92f62d2496 -r66a40e718fdf95596f8897d81af4a1a0144cfae4 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision a6da010d4a68dbf5b4571ea39850ee92f62d2496) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision 66a40e718fdf95596f8897d81af4a1a0144cfae4) @@ -27,15 +27,16 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints; -using GeneralResult = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.GeneralResult; using HydraGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult; using HydraWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; +using HydraIllustrationPointTreeNode = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointTreeNode; +using HydraCombinationType = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.CombinationType; using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; -using WindDirection = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.WindDirection; +using HydraFaultTreeIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.FaultTreeIllustrationPoint; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -54,20 +55,20 @@ } [Test] - public void CreateGeneralResult_ValidArgumentsWithoutIllustrationPoints_ExpectedProperties() + public void CreateGeneralResult_HydraGeneralResultWithoutIllustrationPoints_ExpectedProperties() { // Setup var random = new Random(21); double angle = random.NextDouble(); var hydraGoverningWindDirection = new HydraWindDirection("Name", angle); - var hydraGeneralResult = new HydraGeneralResult - { - Beta = random.NextDouble(), - GoverningWind = hydraGoverningWindDirection, - Stochasts = new List(), - IllustrationPoints = new Dictionary() - }; + var hydraGeneralResult = + new HydraGeneralResult(random.NextDouble(), + hydraGoverningWindDirection, + Enumerable.Empty(), + new Dictionary< + HydraWindDirectionClosingSituation, + HydraIllustrationPointTreeNode>()); // Call GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult); @@ -79,7 +80,7 @@ } [Test] - public void CreateGeneralResult_GeneralResultWithSubmechanismIllustrationPointsOnly_ExpectedProperties() + public void CreateGeneralResult_HydraGeneralResultWithSubmechanismIllustrationPointsOnly_ExpectedProperties() { // Setup const string closingSituation = "Closing situation"; @@ -88,29 +89,28 @@ double windDirectionAngle = random.NextDouble(); var hydraWindDirection = new HydraWindDirection("SSE", windDirectionAngle); var hydraWindDirectionClosingSituation = - new WindDirectionClosingSituation(hydraWindDirection, closingSituation); + new HydraWindDirectionClosingSituation(hydraWindDirection, closingSituation); double beta = random.NextDouble(); - var hydraIllustrationPoint = new HydraSubMechanismIllustrationPoint("Illustration Point", - Enumerable.Empty(), - Enumerable.Empty(), - beta); - var hydraIllustrationTreeNode = new IllustrationPointTreeNode(hydraIllustrationPoint); + var hydraIllustrationPoint = + new HydraSubMechanismIllustrationPoint("Illustration Point", + Enumerable.Empty(), + Enumerable.Empty(), + beta); + var hydraIllustrationTreeNode = new HydraIllustrationPointTreeNode(hydraIllustrationPoint); double governingWindDirectionAngle = random.NextDouble(); var governingHydraWindDirection = new HydraWindDirection("Name", governingWindDirectionAngle); - var hydraGeneralResult = new HydraGeneralResult - { - Beta = random.NextDouble(), - GoverningWind = governingHydraWindDirection, - Stochasts = new List(), - IllustrationPoints = new Dictionary - { - { - hydraWindDirectionClosingSituation, hydraIllustrationTreeNode - } - } - }; + var hydraGeneralResult = + new HydraGeneralResult(random.NextDouble(), + governingHydraWindDirection, + Enumerable.Empty(), + new Dictionary + { + { + hydraWindDirectionClosingSituation, hydraIllustrationTreeNode + } + }); // Call GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult); @@ -133,7 +133,7 @@ } [Test] - public void CreateGeneralResult_GeneralResultWithFaultTreeIllustrationPointsOnly_ExpectedProperties() + public void CreateGeneralResult_HydraGeneralResultWithFaultTreeIllustrationPointsOnly_ExpectedProperties() { // Setup var random = new Random(21); @@ -142,27 +142,26 @@ double windDirectionAngle = random.NextDouble(); var hydraWindDirection = new HydraWindDirection("SSE", windDirectionAngle); var hydraWindDirectionClosingSituation = - new WindDirectionClosingSituation(hydraWindDirection, closingSituation); + new HydraWindDirectionClosingSituation(hydraWindDirection, closingSituation); - var hydraIllustrationPoint = new FaultTreeIllustrationPoint(" IllustrationPoint", - random.NextDouble(), - random.NextEnumValue()); - var hydraIllustrationTreeNode = new IllustrationPointTreeNode(hydraIllustrationPoint); + var hydraIllustrationPoint = + new HydraFaultTreeIllustrationPoint(" IllustrationPoint", + random.NextDouble(), + random.NextEnumValue()); + var hydraIllustrationTreeNode = new HydraIllustrationPointTreeNode(hydraIllustrationPoint); double governingWindDirectionAngle = random.NextDouble(); var governingHydraWindDirection = new HydraWindDirection("Name", governingWindDirectionAngle); - var hydraGeneralResult = new HydraGeneralResult - { - Beta = random.NextDouble(), - GoverningWind = governingHydraWindDirection, - Stochasts = new List(), - IllustrationPoints = new Dictionary - { - { - hydraWindDirectionClosingSituation, hydraIllustrationTreeNode - } - } - }; + var hydraGeneralResult = + new HydraGeneralResult(random.NextDouble(), + governingHydraWindDirection, + Enumerable.Empty(), + new Dictionary + { + { + hydraWindDirectionClosingSituation, hydraIllustrationTreeNode + } + }); // Call GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult);