Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Variables/RandomHydraRingVariable.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Variables/RandomHydraRingVariable.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Variables/RandomHydraRingVariable.cs (revision 649e89c7bbd4e79a738c90513f9d51d387f019a2) @@ -0,0 +1,51 @@ +// 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. + +namespace Ringtoets.HydraRing.Calculation.Data.Variables +{ + /// + /// Class for random Hydra-Ring variable related data. + /// + public abstract class RandomHydraRingVariable : HydraRingVariable + { + private readonly HydraRingDistributionType distributionType; + + /// + /// Creates a new instance of + /// + /// The Hydra-Ring id corresponding to the variable that is considered. + /// The deviation type of the variable. + /// The distribution type of the variable. + protected RandomHydraRingVariable(int variableId, HydraRingDeviationType deviationType, HydraRingDistributionType distributionType) + : base(variableId, deviationType) + { + this.distributionType = distributionType; + } + + public override HydraRingDistributionType DistributionType + { + get + { + return distributionType; + } + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r649e89c7bbd4e79a738c90513f9d51d387f019a2 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 649e89c7bbd4e79a738c90513f9d51d387f019a2) @@ -100,6 +100,7 @@ + Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Variables/RandomHydraRingVariableTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Variables/RandomHydraRingVariableTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Variables/RandomHydraRingVariableTest.cs (revision 649e89c7bbd4e79a738c90513f9d51d387f019a2) @@ -0,0 +1,53 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data; +using Ringtoets.HydraRing.Calculation.Data.Variables; + +namespace Ringtoets.HydraRing.Calculation.Test.Data.Variables +{ + [TestFixture] + public class RandomHydraRingVariableTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var variableId = 1; + var deviationType = HydraRingDeviationType.Variation; + var distributionType = HydraRingDistributionType.LogNormal; + + // Call + var variable = new TestRandomHydraRingVariable(variableId, deviationType, distributionType); + + // Assert + Assert.IsInstanceOf(variable); + Assert.AreEqual(distributionType, variable.DistributionType); + } + + private class TestRandomHydraRingVariable : RandomHydraRingVariable + { + public TestRandomHydraRingVariable(int variableId, HydraRingDeviationType deviationType, HydraRingDistributionType distributionType) + : base(variableId, deviationType, distributionType) {} + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r649e89c7bbd4e79a738c90513f9d51d387f019a2 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 649e89c7bbd4e79a738c90513f9d51d387f019a2) @@ -99,6 +99,7 @@ +