Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs (.../DesignWaterLevelCalculation.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs (.../DesignWaterLevelCalculation.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -97,7 +97,8 @@ /// Gets a value indicating whether this calculation has already been calculated. /// /// true if the calculation is fully calculated, false otherwise. - /// A calculation is fully calculated, depending on if the illustration points are set to be calculated. + /// A calculation is fully calculated, depending on if the illustration points + /// are set to be calculated. public bool IsCalculated() { HydraulicBoundaryLocationCalculation calculation = hydraulicBoundaryLocation.DesignWaterLevelCalculation; Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IWaveHeightCalculation.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IWaveHeightCalculation.cs (.../IWaveHeightCalculation.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IWaveHeightCalculation.cs (.../IWaveHeightCalculation.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -22,7 +22,7 @@ namespace Ringtoets.Common.Data.Hydraulics { /// - /// Interface for a wave height calculation + /// Interface for a wave height calculation. /// public interface IWaveHeightCalculation { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs (.../WaveHeightCalculation.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs (.../WaveHeightCalculation.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -46,6 +46,17 @@ this.hydraulicBoundaryLocation = hydraulicBoundaryLocation; } + /// + /// Gets the observable object to notify upon an internal state change. + /// + public IObservable ObservableObject + { + get + { + return hydraulicBoundaryLocation; + } + } + public long Id { get @@ -85,21 +96,14 @@ /// /// Gets a value indicating whether this calculation has already been calculated. /// - /// + /// true if the calculation is fully calculated, false otherwise. + /// A calculation is fully calculated, depending on if the illustration points + /// are set to be calculated. public bool IsCalculated() { HydraulicBoundaryLocationCalculation calculation = hydraulicBoundaryLocation.WaveHeightCalculation; return calculation.HasOutput && calculation.InputParameters.ShouldIllustrationPointsBeCalculated == calculation.Output.HasIllustrationPoints; } - - /// - /// Gets the observable object to notify upon an internal state change. - /// - /// - public IObservable GetObservableObject() - { - return hydraulicBoundaryLocation; - } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -635,7 +635,7 @@ } /// - /// Looks up a localized string similar to De waarde voor de windrichting moet in het bereik van {0} liggen.. + /// Looks up a localized string similar to De waarde voor de windrichting moet in het bereik {0} liggen.. /// public static string WindDirection_WindDirectionAngle_Value_needs_to_be_in_Range_0_ { get { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -301,6 +301,6 @@ id - De waarde voor de windrichting moet in het bereik van {0} liggen. + De waarde voor de windrichting moet in het bereik {0} liggen. \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationRow.cs =================================================================== diff -u -r298af52e9de68d5beed50a88ec11be5bce1fc783 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationRow.cs (.../HydraulicBoundaryLocationRow.cs) (revision 298af52e9de68d5beed50a88ec11be5bce1fc783) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationRow.cs (.../HydraulicBoundaryLocationRow.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -53,7 +53,7 @@ } /// - /// Gets or sets if the illustration points need to be included. + /// Gets or sets the value indicating whether the illustration points need to be included. /// public bool IncludeIllustrationPoints { Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs (.../GeneralResultConverter.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs (.../GeneralResultConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -23,56 +23,56 @@ using System.Collections.Generic; using System.Linq; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; -using HydraWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; -using HydraIllustrationPointTreeNode = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointTreeNode; -using HydraGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult; +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 HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// Converter for related to creating a . + /// Converter for related to creating a . /// public static class GeneralResultConverter { /// - /// Creates a new instance of based on the information of . + /// Creates a new instance of based on the information of . /// - /// The to base the + /// The to base the /// to create on. /// The newly created . - /// Thrown when is null. - public static GeneralResult CreateGeneralResult(HydraGeneralResult hydraGeneralResult) + /// Thrown when is null. + public static GeneralResult CreateGeneralResult(HydraRingGeneralResult hydraRingGeneralResult) { - if (hydraGeneralResult == null) + if (hydraRingGeneralResult == null) { - throw new ArgumentNullException(nameof(hydraGeneralResult)); + throw new ArgumentNullException(nameof(hydraRingGeneralResult)); } - WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraGeneralResult.GoverningWindDirection); - IEnumerable stochasts = GetStochasts(hydraGeneralResult); + WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraRingGeneralResult.GoverningWindDirection); + IEnumerable stochasts = GetStochasts(hydraRingGeneralResult); IEnumerable windDirectionClosingScenarioIllustrationPoints = - GetWindDirectionClosingSituationIllustrationPoint(hydraGeneralResult); + GetWindDirectionClosingSituationIllustrationPoint(hydraRingGeneralResult); return new GeneralResult(windDirection, stochasts, windDirectionClosingScenarioIllustrationPoints); } - private static IEnumerable GetStochasts(HydraGeneralResult hydraGeneralResult) + private static IEnumerable GetStochasts(HydraRingGeneralResult hydraGeneralResult) { return hydraGeneralResult.Stochasts.Select(StochastConverter.CreateStochast); } private static IEnumerable GetWindDirectionClosingSituationIllustrationPoint( - HydraGeneralResult hydraGeneralResult) + HydraRingGeneralResult hydraGeneralResult) { var combinations = new List(); - foreach (KeyValuePair illustrationPointTreeNode in hydraGeneralResult.IllustrationPoints) + foreach (KeyValuePair illustrationPointTreeNode in hydraGeneralResult.IllustrationPoints) { IHydraRingIllustrationPoint hydraIllustrationPoint = illustrationPointTreeNode.Value.Data; - HydraWindDirectionClosingSituation hydraWindDirectionClosingSituation = illustrationPointTreeNode.Key; + HydraRingWindDirectionClosingSituation hydraWindDirectionClosingSituation = illustrationPointTreeNode.Key; - var subMechanismIllustrationPoint = hydraIllustrationPoint as HydraSubMechanismIllustrationPoint; + var subMechanismIllustrationPoint = hydraIllustrationPoint as HydraRingSubMechanismIllustrationPoint; if (subMechanismIllustrationPoint != null) { combinations.Add(TopLevelSubMechanismIllustrationPointConverter.CreateTopLevelSubMechanismIllustrationPoint( Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs =================================================================== diff -u -r60798b6c24a14033cf598daa43ec844c7ca00326 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs (.../IllustrationPointResultConverter.cs) (revision 60798b6c24a14033cf598daa43ec844c7ca00326) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs (.../IllustrationPointResultConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -21,31 +21,33 @@ using System; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; -using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; +using HydraRingIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// The converter that converts data into data. + /// The converter that converts data into + /// data. /// public static class IllustrationPointResultConverter { /// /// Creates a new instance of based on the information - /// of . + /// of . /// - /// The to base the - /// to create on. + /// The + /// to base the to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. - public static IllustrationPointResult CreateIllustrationPointResult(HydraIllustrationPointResult hydraIllustrationPointResult) + public static IllustrationPointResult CreateIllustrationPointResult(HydraRingIllustrationPointResult hydraRingIllustrationPointResult) { - if (hydraIllustrationPointResult == null) + if (hydraRingIllustrationPointResult == null) { - throw new ArgumentNullException(nameof(hydraIllustrationPointResult)); + throw new ArgumentNullException(nameof(hydraRingIllustrationPointResult)); } - return new IllustrationPointResult(hydraIllustrationPointResult.Description, hydraIllustrationPointResult.Value); + return new IllustrationPointResult(hydraRingIllustrationPointResult.Description, + hydraRingIllustrationPointResult.Value); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs (.../StochastConverter.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs (.../StochastConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -21,53 +21,57 @@ using System; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; -using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; -using HydraSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; +using HydraRingStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; +using HydraRingSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// The converter that converts data into data. + /// The converter that converts data into data. /// public static class StochastConverter { /// - /// Creates a new instance of based on the information of . + /// Creates a new instance of based on the information of . /// - /// The to base the + /// The to base the /// to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. - public static Stochast CreateStochast(HydraStochast hydraStochast) + public static Stochast CreateStochast(HydraRingStochast hydraRingStochast) { - if (hydraStochast == null) + if (hydraRingStochast == null) { - throw new ArgumentNullException(nameof(hydraStochast)); + throw new ArgumentNullException(nameof(hydraRingStochast)); } - return new Stochast(hydraStochast.Name, hydraStochast.Duration, hydraStochast.Alpha); + + return new Stochast(hydraRingStochast.Name, + hydraRingStochast.Duration, + hydraRingStochast.Alpha); } /// /// Creates a new instance of - /// based on the information of . + /// based on the information of . /// - /// The + /// The /// to base the to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. public static SubMechanismIllustrationPointStochast CreateSubMechanismIllustrationStochast( - HydraSubMechanismIllustrationPointStochast hydraSubMechanismIllustrationPointStochast) + HydraRingSubMechanismIllustrationPointStochast hydraRingSubMechanismIllustrationPointStochast) { - if (hydraSubMechanismIllustrationPointStochast == null) + if (hydraRingSubMechanismIllustrationPointStochast == null) { - throw new ArgumentNullException(nameof(hydraSubMechanismIllustrationPointStochast)); + throw new ArgumentNullException(nameof(hydraRingSubMechanismIllustrationPointStochast)); } - return new SubMechanismIllustrationPointStochast(hydraSubMechanismIllustrationPointStochast.Name, - hydraSubMechanismIllustrationPointStochast.Duration, - hydraSubMechanismIllustrationPointStochast.Alpha, - hydraSubMechanismIllustrationPointStochast.Realization); + + return new SubMechanismIllustrationPointStochast(hydraRingSubMechanismIllustrationPointStochast.Name, + hydraRingSubMechanismIllustrationPointStochast.Duration, + hydraRingSubMechanismIllustrationPointStochast.Alpha, + hydraRingSubMechanismIllustrationPointStochast.Realization); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs (.../SubMechanismIllustrationPointConverter.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs (.../SubMechanismIllustrationPointConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -22,45 +22,43 @@ using System; using System.Collections.Generic; using System.Linq; -using Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints; -using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; -using IllustrationPointResult = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.IllustrationPointResult; -using SubMechanismIllustrationPoint = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.SubMechanismIllustrationPoint; -using SubMechanismIllustrationPointStochast = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.SubMechanismIllustrationPointStochast; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// The converter that converts data into data. + /// The converter that converts data into + /// data. /// public static class SubMechanismIllustrationPointConverter { /// - /// Creates a new instance of based on the information of - /// . + /// Creates a new instance of based on the + /// information of . /// - /// The to base the - /// to create on. + /// The + /// to base the to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. public static SubMechanismIllustrationPoint CreateSubMechanismIllustrationPoint( - HydraSubMechanismIllustrationPoint subMechanismIllustrationPoint) + HydraRingSubMechanismIllustrationPoint hydraRingSubMechanismIllustrationPoint) { - if (subMechanismIllustrationPoint == null) + if (hydraRingSubMechanismIllustrationPoint == null) { - throw new ArgumentNullException(nameof(subMechanismIllustrationPoint)); + throw new ArgumentNullException(nameof(hydraRingSubMechanismIllustrationPoint)); } - IEnumerable stochasts = subMechanismIllustrationPoint + IEnumerable stochasts = hydraRingSubMechanismIllustrationPoint .Stochasts.Select(StochastConverter.CreateSubMechanismIllustrationStochast); - IEnumerable illustrationPointResults = subMechanismIllustrationPoint + IEnumerable illustrationPointResults = hydraRingSubMechanismIllustrationPoint .Results.Select(IllustrationPointResultConverter.CreateIllustrationPointResult); - return new SubMechanismIllustrationPoint(subMechanismIllustrationPoint.Name, + return new SubMechanismIllustrationPoint(hydraRingSubMechanismIllustrationPoint.Name, stochasts, illustrationPointResults, - subMechanismIllustrationPoint.Beta); + hydraRingSubMechanismIllustrationPoint.Beta); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs (.../TopLevelSubMechanismIllustrationPointConverter.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs (.../TopLevelSubMechanismIllustrationPointConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -21,50 +21,48 @@ using System; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; -using Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints; -using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; -using SubMechanismIllustrationPoint = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.SubMechanismIllustrationPoint; -using WindDirection = Ringtoets.Common.Data.Hydraulics.IllustrationPoints.WindDirection; +using HydraRingWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// Converter for and - /// related to creating a + /// Converter for and + /// related to creating a /// . /// public static class TopLevelSubMechanismIllustrationPointConverter { /// /// Creates a new instance of - /// based on the information of - /// and . + /// based on the information of + /// and . /// - /// The + /// The /// to base the on. - /// The + /// The /// to base the on. /// A . /// Thrown when any parameter is null. public static TopLevelSubMechanismIllustrationPoint CreateTopLevelSubMechanismIllustrationPoint( - WindDirectionClosingSituation hydraWindDirectionClosingSituation, - HydraSubMechanismIllustrationPoint hydraSubMechanismIllustrationPoint) + HydraRingWindDirectionClosingSituation hydraRingWindDirectionClosingSituation, + HydraRingSubMechanismIllustrationPoint hydraRingSubMechanismIllustrationPoint) { - if (hydraWindDirectionClosingSituation == null) + if (hydraRingWindDirectionClosingSituation == null) { - throw new ArgumentNullException(nameof(hydraWindDirectionClosingSituation)); + throw new ArgumentNullException(nameof(hydraRingWindDirectionClosingSituation)); } - if (hydraSubMechanismIllustrationPoint == null) + if (hydraRingSubMechanismIllustrationPoint == null) { - throw new ArgumentNullException(nameof(hydraSubMechanismIllustrationPoint)); + throw new ArgumentNullException(nameof(hydraRingSubMechanismIllustrationPoint)); } - WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraWindDirectionClosingSituation.WindDirection); + WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraRingWindDirectionClosingSituation.WindDirection); SubMechanismIllustrationPoint subMechanismIllustrationPoint = - SubMechanismIllustrationPointConverter.CreateSubMechanismIllustrationPoint(hydraSubMechanismIllustrationPoint); + SubMechanismIllustrationPointConverter.CreateSubMechanismIllustrationPoint(hydraRingSubMechanismIllustrationPoint); return new TopLevelSubMechanismIllustrationPoint(windDirection, - hydraWindDirectionClosingSituation.ClosingSituation, + hydraRingWindDirectionClosingSituation.ClosingSituation, subMechanismIllustrationPoint); } } Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/WindDirectionConverter.cs =================================================================== diff -u -r342ecb50ef0e54c04002a2643689c6d0108518c7 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/WindDirectionConverter.cs (.../WindDirectionConverter.cs) (revision 342ecb50ef0e54c04002a2643689c6d0108518c7) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/WindDirectionConverter.cs (.../WindDirectionConverter.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -21,30 +21,32 @@ using System; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; -using HydraWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; +using HydraRingWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; namespace Ringtoets.Common.Service.IllustrationPoints { /// - /// The converter that converts data into data. + /// The converter that converts data into data. /// public static class WindDirectionConverter { /// - /// Creates a new instance of based on the information of . + /// Creates a new instance of based on the information of . /// - /// The to base the + /// The to base the /// to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. - public static WindDirection CreateWindDirection(HydraWindDirection hydraWindDirection) + public static WindDirection CreateWindDirection(HydraRingWindDirection hydraRingWindDirection) { - if (hydraWindDirection == null) + if (hydraRingWindDirection == null) { - throw new ArgumentNullException(nameof(hydraWindDirection)); + throw new ArgumentNullException(nameof(hydraRingWindDirection)); } - return new WindDirection(hydraWindDirection.Name, hydraWindDirection.Angle); + + return new WindDirection(hydraRingWindDirection.Name, + hydraRingWindDirection.Angle); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs (.../WaveHeightCalculationActivity.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs (.../WaveHeightCalculationActivity.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -102,7 +102,7 @@ protected override void OnFinish() { - waveHeightCalculation.GetObservableObject().NotifyObservers(); + waveHeightCalculation.ObservableObject.NotifyObservers(); } private bool AlreadyCalculated Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionTest.cs =================================================================== diff -u -r342ecb50ef0e54c04002a2643689c6d0108518c7 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionTest.cs (.../WindDirectionTest.cs) (revision 342ecb50ef0e54c04002a2643689c6d0108518c7) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionTest.cs (.../WindDirectionTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/WaveHeightCalculationTest.cs =================================================================== diff -u -ra5c551a343fee7ea3d7e46dd36c82cf180a1b597 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/WaveHeightCalculationTest.cs (.../WaveHeightCalculationTest.cs) (revision a5c551a343fee7ea3d7e46dd36c82cf180a1b597) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/WaveHeightCalculationTest.cs (.../WaveHeightCalculationTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -96,7 +96,7 @@ HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocation.WaveHeightCalculation; Assert.AreEqual(hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated, calculation.CalculateIllustrationPoints); - Assert.AreSame(hydraulicBoundaryLocation, calculation.GetObservableObject()); + Assert.AreSame(hydraulicBoundaryLocation, calculation.ObservableObject); } [Test] Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPoint.cs =================================================================== diff -u -r6a60e0e3f676c71e253ad41839519c18dd641e9e -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPoint.cs (.../TestSubMechanismIllustrationPoint.cs) (revision 6a60e0e3f676c71e253ad41839519c18dd641e9e) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestSubMechanismIllustrationPoint.cs (.../TestSubMechanismIllustrationPoint.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -33,6 +33,9 @@ /// Creates a . /// public TestSubMechanismIllustrationPoint() - : base("Illustration Point", Enumerable.Empty(), Enumerable.Empty(), 3.14) {} + : base("Illustration Point", + Enumerable.Empty(), + Enumerable.Empty(), + 3.14) {} } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -27,51 +27,51 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -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 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 HydraFaultTreeIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.FaultTreeIllustrationPoint; -using HydraSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; -using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +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 GeneralResultConverterTest { [Test] - public void CreateGeneralResult_HydraGeneralResultNull_ThrowsArgumentNullException() + public void CreateGeneralResult_HydraRingGeneralResultNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => GeneralResultConverter.CreateGeneralResult(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraGeneralResult", paramName); + Assert.AreEqual("hydraRingGeneralResult", paramName); } [Test] - public void CreateGeneralResult_HydraGeneralResultWithoutIllustrationPoints_ExpectedProperties() + public void CreateGeneralResult_HydraRingGeneralResultWithoutIllustrationPoints_ExpectedProperties() { // Setup var random = new Random(21); double angle = random.NextDouble(); - var hydraGoverningWindDirection = new HydraWindDirection("Name", angle); + var hydraGoverningWindDirection = new HydraRingWindDirection("Name", angle); - var hydraGeneralResult = - new HydraGeneralResult(random.NextDouble(), - hydraGoverningWindDirection, - Enumerable.Empty(), - new Dictionary< - HydraWindDirectionClosingSituation, - HydraIllustrationPointTreeNode>()); + var hydraRingGeneralResult = + new HydraRingGeneralResult(random.NextDouble(), + hydraGoverningWindDirection, + Enumerable.Empty(), + new Dictionary< + HydraRingWindDirectionClosingSituation, + HydraRingIllustrationPointTreeNode>()); // Call - GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult); + GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraRingGeneralResult); // Assert AssertWindDirection(hydraGoverningWindDirection, generalResult.GoverningWindDirection); @@ -80,37 +80,37 @@ } [Test] - public void CreateGeneralResult_HydraGeneralResultWithSubMechanismIllustrationPointsOnly_ExpectedProperties() + public void CreateGeneralResult_HydraRingGeneralResultWithSubMechanismIllustrationPointsOnly_ExpectedProperties() { // Setup const string closingSituation = "Closing situation"; var random = new Random(21); double windDirectionAngle = random.NextDouble(); - var hydraWindDirection = new HydraWindDirection("SSE", windDirectionAngle); - var hydraWindDirectionClosingSituation = - new HydraWindDirectionClosingSituation(hydraWindDirection, closingSituation); + var hydraRingWindDirection = new HydraRingWindDirection("SSE", windDirectionAngle); + var hydraRingWindDirectionClosingSituation = + new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, closingSituation); double beta = random.NextDouble(); - var hydraIllustrationPoint = - new HydraSubMechanismIllustrationPoint("Illustration Point", - Enumerable.Empty(), - Enumerable.Empty(), - beta); - var hydraIllustrationTreeNode = new HydraIllustrationPointTreeNode(hydraIllustrationPoint); + var hydraRingIllustrationPoint = + new HydraRingSubMechanismIllustrationPoint("Illustration Point", + Enumerable.Empty(), + Enumerable.Empty(), + beta); + var hydraRingIllustrationTreeNode = new HydraRingIllustrationPointTreeNode(hydraRingIllustrationPoint); double governingWindDirectionAngle = random.NextDouble(); - var governingHydraWindDirection = new HydraWindDirection("Name", governingWindDirectionAngle); + var governingHydraWindDirection = new HydraRingWindDirection("Name", governingWindDirectionAngle); var hydraGeneralResult = - new HydraGeneralResult(random.NextDouble(), - governingHydraWindDirection, - Enumerable.Empty(), - new Dictionary - { + new HydraRingGeneralResult(random.NextDouble(), + governingHydraWindDirection, + Enumerable.Empty(), + new Dictionary { - hydraWindDirectionClosingSituation, hydraIllustrationTreeNode - } - }); + { + hydraRingWindDirectionClosingSituation, hydraRingIllustrationTreeNode + } + }); // Call GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult); @@ -122,61 +122,61 @@ CollectionAssert.IsEmpty(generalResult.Stochasts); TopLevelSubMechanismIllustrationPoint combination = generalResult.TopLevelSubMechanismIllustrationPoints.Single(); - AssertWindDirection(hydraWindDirection, combination.WindDirection); + AssertWindDirection(hydraRingWindDirection, combination.WindDirection); Assert.AreEqual(closingSituation, combination.ClosingSituation); SubMechanismIllustrationPoint subMechanismIllustrationPoint = combination.SubMechanismIllustrationPoint; - Assert.AreEqual(hydraIllustrationPoint.Name, subMechanismIllustrationPoint.Name); - Assert.AreEqual(hydraIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta.GetAccuracy()); + 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 CreateGeneralResult_HydraGeneralResultWithFaultTreeIllustrationPointsOnly_ExpectedProperties() + public void CreateGeneralResult_HydraRingGeneralResultWithFaultTreeIllustrationPointsOnly_ExpectedProperties() { // Setup var random = new Random(21); const string closingSituation = "Closing situation"; double windDirectionAngle = random.NextDouble(); - var hydraWindDirection = new HydraWindDirection("SSE", windDirectionAngle); - var hydraWindDirectionClosingSituation = - new HydraWindDirectionClosingSituation(hydraWindDirection, closingSituation); + var hydraRingWindDirection = new HydraRingWindDirection("SSE", windDirectionAngle); + var hydraRingWindDirectionClosingSituation = + new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, closingSituation); - var hydraIllustrationPoint = - new HydraFaultTreeIllustrationPoint(" IllustrationPoint", - random.NextDouble(), - random.NextEnumValue()); - var hydraIllustrationTreeNode = new HydraIllustrationPointTreeNode(hydraIllustrationPoint); + var hydraRingIllustrationPoint = + new HydraRingFaultTreeIllustrationPoint(" IllustrationPoint", + random.NextDouble(), + random.NextEnumValue()); + var hydraRingIllustrationTreeNode = new HydraRingIllustrationPointTreeNode(hydraRingIllustrationPoint); double governingWindDirectionAngle = random.NextDouble(); - var governingHydraWindDirection = new HydraWindDirection("Name", governingWindDirectionAngle); - var hydraGeneralResult = - new HydraGeneralResult(random.NextDouble(), - governingHydraWindDirection, - Enumerable.Empty(), - new Dictionary - { + var governingHydraRingWindDirection = new HydraRingWindDirection("Name", governingWindDirectionAngle); + var hydraRingGeneralResult = + new HydraRingGeneralResult(random.NextDouble(), + governingHydraRingWindDirection, + Enumerable.Empty(), + new Dictionary { - hydraWindDirectionClosingSituation, hydraIllustrationTreeNode - } - }); + { + hydraRingWindDirectionClosingSituation, hydraRingIllustrationTreeNode + } + }); // Call - GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraGeneralResult); + GeneralResult generalResult = GeneralResultConverter.CreateGeneralResult(hydraRingGeneralResult); // Assert WindDirection generalResultGoverningWindDirection = generalResult.GoverningWindDirection; - AssertWindDirection(governingHydraWindDirection, generalResultGoverningWindDirection); + AssertWindDirection(governingHydraRingWindDirection, generalResultGoverningWindDirection); CollectionAssert.IsEmpty(generalResult.Stochasts); CollectionAssert.IsEmpty(generalResult.TopLevelSubMechanismIllustrationPoints); } - private static void AssertWindDirection(HydraWindDirection hydraWindDirection, WindDirection windDirection) + private static void AssertWindDirection(HydraRingWindDirection hydraRingWindDirection, WindDirection windDirection) { - Assert.AreEqual(hydraWindDirection.Name, windDirection.Name); - Assert.AreEqual(hydraWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); + Assert.AreEqual(hydraRingWindDirection.Name, windDirection.Name); + Assert.AreEqual(hydraRingWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs =================================================================== diff -u -r2bda1fe026b3f2c9bf6f4d0254e3292bbd887f78 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs (.../IllustrationPointResultConverterTest.cs) (revision 2bda1fe026b3f2c9bf6f4d0254e3292bbd887f78) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs (.../IllustrationPointResultConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -24,34 +24,34 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; +using HydraRingIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; namespace Ringtoets.Common.Service.Test.IllustrationPoints { [TestFixture] public class IllustrationPointResultConverterTest { [Test] - public void CreateIllustrationPointResult_HydraIllustrationPointResultNull_ThrowsArgumentNullException() + public void CreateIllustrationPointResult_HydraRingIllustrationPointResultNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => IllustrationPointResultConverter.CreateIllustrationPointResult(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraIllustrationPointResult", paramName); + Assert.AreEqual("hydraRingIllustrationPointResult", paramName); } [Test] public void CreateIllustrationPointResult_ValidArguments_ExpectedProperties() { // Setup var random = new Random(21); - var hydraIllustrationPointResult = new HydraIllustrationPointResult("Description", - random.NextDouble()); + var hydraRingIllustrationPointResult = new HydraRingIllustrationPointResult("Description", + random.NextDouble()); // Call - IllustrationPointResult illustrationPointResult = IllustrationPointResultConverter.CreateIllustrationPointResult(hydraIllustrationPointResult); + IllustrationPointResult illustrationPointResult = IllustrationPointResultConverter.CreateIllustrationPointResult(hydraRingIllustrationPointResult); // Assert Assert.AreEqual(illustrationPointResult.Description, illustrationPointResult.Description); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -24,23 +24,23 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; -using HydraSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; +using HydraRingStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; +using HydraRingSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { [TestFixture] public class StochastConverterTest { [Test] - public void CreateStochast_HydraStochastNull_ThrowsArgumentNullException() + public void CreateStochast_HydraRingStochastNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => StochastConverter.CreateStochast(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraStochast", paramName); + Assert.AreEqual("hydraRingStochast", paramName); } [Test] @@ -52,26 +52,26 @@ var random = new Random(21); double duration = random.NextDouble(); double alpha = random.NextDouble(); - var hydraStochast = new HydraStochast(name, duration, alpha); + var hydraRingStochast = new HydraRingStochast(name, duration, alpha); // Call - Stochast stochast = StochastConverter.CreateStochast(hydraStochast); + Stochast stochast = StochastConverter.CreateStochast(hydraRingStochast); // Assert - Assert.AreEqual(hydraStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); + Assert.AreEqual(hydraRingStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); - Assert.AreEqual(hydraStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingStochast.Name, stochast.Name); } [Test] - public void CreateSubMechanismIllustrationStochast_HydraSubMechanismIllustrationPointStochastNull_ThrowsArgumentNullException() + public void CreateSubMechanismIllustrationStochast_HydraRingSubMechanismIllustrationPointStochastNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => StochastConverter.CreateSubMechanismIllustrationStochast(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraSubMechanismIllustrationPointStochast", paramName); + Assert.AreEqual("hydraRingSubMechanismIllustrationPointStochast", paramName); } [Test] @@ -85,16 +85,16 @@ double alpha = random.NextDouble(); double realization = random.NextDouble(); - var hydraStochast = new HydraSubMechanismIllustrationPointStochast(name, duration, alpha, realization); + var hydraRingStochast = new HydraRingSubMechanismIllustrationPointStochast(name, duration, alpha, realization); // Call - SubMechanismIllustrationPointStochast stochast = StochastConverter.CreateSubMechanismIllustrationStochast(hydraStochast); + SubMechanismIllustrationPointStochast stochast = StochastConverter.CreateSubMechanismIllustrationStochast(hydraRingStochast); // Assert - Assert.AreEqual(hydraStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); + Assert.AreEqual(hydraRingStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); - Assert.AreEqual(hydraStochast.Name, stochast.Name); - Assert.AreEqual(hydraStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); + Assert.AreEqual(hydraRingStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs (.../SubMechanismIllustrationPointConverterTest.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs (.../SubMechanismIllustrationPointConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -25,44 +25,45 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; -using HydraSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; +using HydraRingIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraRingSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { [TestFixture] public class SubMechanismIllustrationPointConverterTest { [Test] - public void CreateCreateIllustrationPoint_SubMechanismIllustrationPointNull_ThrowsArgumentNullException() + public void CreateCreateIllustrationPoint_HydraRingSubMechanismIllustrationPointNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => SubMechanismIllustrationPointConverter.CreateSubMechanismIllustrationPoint(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("subMechanismIllustrationPoint", paramName); + Assert.AreEqual("hydraRingSubMechanismIllustrationPoint", paramName); } [Test] public void CreateIllustrationPoint_ValidArguments_ExpectedProperties() { // Setup var random = new Random(21); - var hydraIllustrationPointResult = new HydraIllustrationPointResult("HydraIllustrationPointResult", - random.NextDouble()); + var hydraIllustrationPointResult = new HydraRingIllustrationPointResult("HydraIllustrationPointResult", + random.NextDouble()); - const string name = "hydraSubMechanismIllustrationPointStochast"; + const string name = "hydraRingSubMechanismIllustrationPointStochast"; double alpha = random.NextDouble(); double duration = random.NextDouble(); double realization = random.NextDouble(); - var hydraSubMechanismIllustrationPointStochast = - new HydraSubMechanismIllustrationPointStochast(name, duration, alpha, realization); + var hydraRingSubMechanismIllustrationPointStochast = + new HydraRingSubMechanismIllustrationPointStochast(name, duration, alpha, realization); double beta = random.NextDouble(); - var hydraSubMechanismIllustrationPoint = new HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint("name", new[] + var hydraSubMechanismIllustrationPoint = new HydraRingSubMechanismIllustrationPoint("name", new[] { - hydraSubMechanismIllustrationPointStochast + hydraRingSubMechanismIllustrationPointStochast }, new[] { hydraIllustrationPointResult @@ -81,10 +82,10 @@ Assert.AreEqual(hydraIllustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); SubMechanismIllustrationPointStochast stochast = subMechanismIllustrationPoint.Stochasts.Single(); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Name, stochast.Name); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverterTest.cs =================================================================== diff -u -rc2c7e9621863d470ddd3a1d5c0e4913844066aae -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverterTest.cs (.../TopLevelSubMechanismIllustrationPointConverterTest.cs) (revision c2c7e9621863d470ddd3a1d5c0e4913844066aae) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverterTest.cs (.../TopLevelSubMechanismIllustrationPointConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -25,11 +25,12 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using HydraWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; -using HydraWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; -using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; +using HydraRingWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; +using HydraRingWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; +using HydraRingIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; using HydraRingTestWindDirection = Ringtoets.HydraRing.Calculation.TestUtil.IllustrationPoints.TestWindDirection; -using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraRingSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraRingSubMechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -40,37 +41,37 @@ public void CreateTopLevelSubMechanismIllustrationPoint_HydraWindDirectionNull_ThrowsArgumentNullException() { // Setup - var hydraSubMechanismIllustrationPoint = - new HydraSubMechanismIllustrationPoint("name", - Enumerable.Empty(), - Enumerable.Empty(), - double.NaN); + var hydraRingSubMechanismIllustrationPoint = + new HydraRingSubMechanismIllustrationPoint("name", + Enumerable.Empty(), + Enumerable.Empty(), + double.NaN); // Call TestDelegate call = () => TopLevelSubMechanismIllustrationPointConverter.CreateTopLevelSubMechanismIllustrationPoint( - null, hydraSubMechanismIllustrationPoint); + null, hydraRingSubMechanismIllustrationPoint); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraWindDirectionClosingSituation", paramName); + Assert.AreEqual("hydraRingWindDirectionClosingSituation", paramName); } [Test] public void CreateTopLevelSubMechanismIllustrationPoint_SubMechanismIllustrationPointNull_ThrowsArgumentNullException() { // Setup - var hydraWindDirection = new HydraRingTestWindDirection(); + var hydraRingWindDirection = new HydraRingTestWindDirection(); // Call TestDelegate call = () => TopLevelSubMechanismIllustrationPointConverter.CreateTopLevelSubMechanismIllustrationPoint( - new HydraWindDirectionClosingSituation(hydraWindDirection, string.Empty), + new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, string.Empty), null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraSubMechanismIllustrationPoint", paramName); + Assert.AreEqual("hydraRingSubMechanismIllustrationPoint", paramName); } [Test] @@ -81,54 +82,55 @@ var random = new Random(21); double angle = random.NextDouble(); - var hydraWindDirection = new HydraWindDirection("Name", angle); + var hydraRingWindDirection = new HydraRingWindDirection("Name", angle); - var windDirectionClosingSituation = new HydraWindDirectionClosingSituation(hydraWindDirection, closingScenario); + var hydraRingWindDirectionClosingSituation = new HydraRingWindDirectionClosingSituation(hydraRingWindDirection, + closingScenario); - var hydraIllustrationPointResult = new HydraIllustrationPointResult("HydraIllustrationPointResult", - random.NextDouble()); + var hydraRingIllustrationPointResult = new HydraRingIllustrationPointResult("HydraIllustrationPointResult", + random.NextDouble()); const string name = "HydraSubMechanismIllustrationPointStochast"; double alpha = random.NextDouble(); double duration = random.NextDouble(); double realization = random.NextDouble(); - var hydraSubMechanismIllustrationPointStochast = - new HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPointStochast(name, duration, alpha, realization); + var hydraRingSubMechanismIllustrationPointStochast = + new HydraRingSubMechanismIllustrationPointStochast(name, duration, alpha, realization); double beta = random.NextDouble(); - var hydraSubMechanismIllustrationPoint = new HydraSubMechanismIllustrationPoint("name", new[] + var hydraRingSubMechanismIllustrationPoint = new HydraRingSubMechanismIllustrationPoint("name", new[] { - hydraSubMechanismIllustrationPointStochast + hydraRingSubMechanismIllustrationPointStochast }, new[] { - hydraIllustrationPointResult + hydraRingIllustrationPointResult }, beta); // Call TopLevelSubMechanismIllustrationPoint combination = TopLevelSubMechanismIllustrationPointConverter.CreateTopLevelSubMechanismIllustrationPoint( - windDirectionClosingSituation, hydraSubMechanismIllustrationPoint); + hydraRingWindDirectionClosingSituation, hydraRingSubMechanismIllustrationPoint); // Assert WindDirection windDirection = combination.WindDirection; - Assert.AreEqual(hydraWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); - Assert.AreEqual(hydraWindDirection.Name, windDirection.Name); + Assert.AreEqual(hydraRingWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); + Assert.AreEqual(hydraRingWindDirection.Name, windDirection.Name); Assert.AreEqual(closingScenario, combination.ClosingSituation); SubMechanismIllustrationPoint subMechanismIllustrationPoint = combination.SubMechanismIllustrationPoint; - Assert.AreEqual(hydraSubMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta.GetAccuracy()); - Assert.AreEqual(hydraSubMechanismIllustrationPoint.Name, subMechanismIllustrationPoint.Name); + Assert.AreEqual(hydraRingSubMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta, subMechanismIllustrationPoint.Beta.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPoint.Name, subMechanismIllustrationPoint.Name); IllustrationPointResult illustrationPointResult = subMechanismIllustrationPoint.IllustrationPointResults.Single(); - Assert.AreEqual(hydraIllustrationPointResult.Description, illustrationPointResult.Description); - Assert.AreEqual(hydraIllustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); + Assert.AreEqual(hydraRingIllustrationPointResult.Description, illustrationPointResult.Description); + Assert.AreEqual(hydraRingIllustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); SubMechanismIllustrationPointStochast stochast = subMechanismIllustrationPoint.Stochasts.Single(); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Duration, stochast.Duration, stochast.Duration.GetAccuracy()); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Name, stochast.Name); - Assert.AreEqual(hydraSubMechanismIllustrationPointStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Duration, stochast.Duration, stochast.Duration.GetAccuracy()); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs =================================================================== diff -u -r342ecb50ef0e54c04002a2643689c6d0108518c7 -r7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs (.../WindDirectionConverterTest.cs) (revision 342ecb50ef0e54c04002a2643689c6d0108518c7) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs (.../WindDirectionConverterTest.cs) (revision 7f4eb38b0c9023e8a66cbce632cd10a16ef9e4bb) @@ -24,22 +24,22 @@ using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; -using HydraWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; +using HydraRingWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; namespace Ringtoets.Common.Service.Test.IllustrationPoints { [TestFixture] public class WindDirectionConverterTest { [Test] - public void CreateWindDirection_HydraWindDirectionNull_ThrowsArgumentNullException() + public void CreateWindDirection_HydraRingWindDirectionNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => WindDirectionConverter.CreateWindDirection(null); // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraWindDirection", paramName); + Assert.AreEqual("hydraRingWindDirection", paramName); } [Test] @@ -48,14 +48,14 @@ // Setup var random = new Random(21); double angle = random.NextDouble(); - var hydraWindDirection = new HydraWindDirection("name", angle); + var hydraRingWindDirection = new HydraRingWindDirection("name", angle); // Call - WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraWindDirection); + WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraRingWindDirection); // Assert - Assert.AreEqual(hydraWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); - Assert.AreEqual(hydraWindDirection.Name, windDirection.Name); + Assert.AreEqual(hydraRingWindDirection.Angle, windDirection.Angle, windDirection.Angle.GetAccuracy()); + Assert.AreEqual(hydraRingWindDirection.Name, windDirection.Name); } } } \ No newline at end of file