Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/CombinedAssemblyFailureMechanismInput.cs =================================================================== diff -u --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/CombinedAssemblyFailureMechanismInput.cs (revision 0) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/CombinedAssemblyFailureMechanismInput.cs (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) @@ -0,0 +1,68 @@ +// 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 System; +using System.Collections.Generic; + +namespace Ringtoets.AssemblyTool.Data +{ + /// + /// Class that contains the data that is necessary to determine + /// the combined failure mechanism sections assembly. + /// + public class CombinedAssemblyFailureMechanismInput + { + /// + /// Creates a new instance of . + /// + /// The 'N' parameter used to factor in the 'length effect'. + /// The contribution of the failure mechanism. + /// The sections of the failure mechanism. + public CombinedAssemblyFailureMechanismInput(double failureMechanismN, double failureMechanismContribution, + IEnumerable sections) + { + if (sections == null) + { + throw new ArgumentNullException(nameof(sections)); + } + + N = failureMechanismN; + FailureMechanismContribution = failureMechanismContribution; + Sections = sections; + } + + + /// + /// Gets the 'N' parameter used to factor in the 'length effect'. + /// + public double N { get; } + + /// + /// Gets the contribution of the failure mechanism. + /// + public double FailureMechanismContribution { get; } + + /// + /// Gets the sections of the failure mechanism. + /// + public IEnumerable Sections { get; } + } +} \ No newline at end of file Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj =================================================================== diff -u -reb6ad1512b5ae48364a1d340ecde44a27c2d4cf4 -r62f92dde2608e60a2be161f4757e4d643196d7b4 --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj (.../Ringtoets.AssemblyTool.Data.csproj) (revision eb6ad1512b5ae48364a1d340ecde44a27c2d4cf4) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj (.../Ringtoets.AssemblyTool.Data.csproj) (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) @@ -16,6 +16,7 @@ + Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/CombinedAssemblyFailureMechanismInputTest.cs =================================================================== diff -u --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/CombinedAssemblyFailureMechanismInputTest.cs (revision 0) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/CombinedAssemblyFailureMechanismInputTest.cs (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) @@ -0,0 +1,64 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; + +namespace Ringtoets.AssemblyTool.Data.Test +{ + [TestFixture] + public class CombinedAssemblyFailureMechanismInputTest + { + [Test] + public void Constructor_SectionsNull_ThrowsArgumentNullException() + { + // Setup + var random = new Random(21); + + // Call + TestDelegate call = () => new CombinedAssemblyFailureMechanismInput(random.NextDouble(), random.NextDouble(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("sections", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var random = new Random(21); + double n = random.NextDouble(); + double contribution = random.NextDouble(); + IEnumerable sections = Enumerable.Empty(); + + // Call + var input = new CombinedAssemblyFailureMechanismInput(n, contribution, sections); + + // Assert + Assert.AreEqual(n, input.N); + Assert.AreEqual(contribution, input.FailureMechanismContribution); + Assert.AreSame(sections, input.Sections); + } + } +} \ No newline at end of file Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj =================================================================== diff -u -reb6ad1512b5ae48364a1d340ecde44a27c2d4cf4 -r62f92dde2608e60a2be161f4757e4d643196d7b4 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj (.../Ringtoets.AssemblyTool.Data.Test.csproj) (revision eb6ad1512b5ae48364a1d340ecde44a27c2d4cf4) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj (.../Ringtoets.AssemblyTool.Data.Test.csproj) (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) @@ -19,6 +19,7 @@ +