Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs =================================================================== diff -u --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (revision 0) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,58 @@ +// 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 Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Forms.PropertyClasses; + +namespace Ringtoets.ClosingStructures.Forms.PropertyClasses +{ + /// + /// ViewModel of closing structures for properties panel. + /// + public class ClosingStructuresOutputProperties : StructuresOutputProperties + { + /// + /// Creates a new instance of . + /// + /// The structures output to create the object properties for. + /// The failure mechanism the output belongs to. + /// The assessment section the output belongs to. + /// Thrown when any parameter is null. + public ClosingStructuresOutputProperties(StructuresOutput structuresOutput, + ClosingStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(structuresOutput) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + } + } +} \ No newline at end of file Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj =================================================================== diff -u -rb08299f5057df68faf4b166a7b438e275339e02f -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision b08299f5057df68faf4b166a7b438e275339e02f) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -29,6 +29,7 @@ Resources.resx + UserControl Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs =================================================================== diff -u --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs (revision 0) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,84 @@ +// 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 NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.ClosingStructures.Data; +using Ringtoets.ClosingStructures.Forms.PropertyClasses; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.PropertyClasses; + +namespace Ringtoets.ClosingStructures.Forms.Test.PropertyClasses +{ + [TestFixture] + public class ClosingStructuresOutputPropertiesTest + { + [Test] + public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + // Call + TestDelegate call = () => new ClosingStructuresOutputProperties(new TestStructuresOutput(), null, assessmentSection); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("failureMechanism", exception.ParamName); + mocks.VerifyAll(); + } + + [Test] + public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new ClosingStructuresOutputProperties(new TestStructuresOutput(), new ClosingStructuresFailureMechanism(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var output = new TestStructuresOutput(); + var failureMechanism = new ClosingStructuresFailureMechanism(); + + // Call + var properties = new ClosingStructuresOutputProperties(output, failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf(properties); + Assert.AreSame(output, properties.Data); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj =================================================================== diff -u -rb08299f5057df68faf4b166a7b438e275339e02f -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision b08299f5057df68faf4b166a7b438e275339e02f) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -35,6 +35,7 @@ + Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs =================================================================== diff -u --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs (revision 0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,58 @@ +// 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 Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.HeightStructures.Data; + +namespace Ringtoets.HeightStructures.Forms.PropertyClasses +{ + /// + /// ViewModel of height structures for properties panel. + /// + public class HeightStructuresOutputProperties : StructuresOutputProperties + { + /// + /// Creates a new instance of . + /// + /// The structures output to create the object properties for. + /// The failure mechanism the output belongs to. + /// The assessment section the output belongs to. + /// Thrown when any parameter is null. + public HeightStructuresOutputProperties(StructuresOutput structuresOutput, + HeightStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(structuresOutput) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + } + } +} \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj =================================================================== diff -u -r78c111ebbe15d17e3a54a3910642f520b593586d -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision 78c111ebbe15d17e3a54a3910642f520b593586d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -24,6 +24,7 @@ + UserControl Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs =================================================================== diff -u --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs (revision 0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,84 @@ +// 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 NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.HeightStructures.Data; +using Ringtoets.HeightStructures.Forms.PropertyClasses; + +namespace Ringtoets.HeightStructures.Forms.Test.PropertyClasses +{ + [TestFixture] + public class HeightStructuresOutputPropertiesTest + { + [Test] + public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + // Call + TestDelegate call = () => new HeightStructuresOutputProperties(new TestStructuresOutput(), null, assessmentSection); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("failureMechanism", exception.ParamName); + mocks.VerifyAll(); + } + + [Test] + public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new HeightStructuresOutputProperties(new TestStructuresOutput(), new HeightStructuresFailureMechanism(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var output = new TestStructuresOutput(); + var failureMechanism = new HeightStructuresFailureMechanism(); + + // Call + var properties = new HeightStructuresOutputProperties(output, failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf(properties); + Assert.AreSame(output, properties.Data); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj =================================================================== diff -u -r78c111ebbe15d17e3a54a3910642f520b593586d -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision 78c111ebbe15d17e3a54a3910642f520b593586d) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -35,6 +35,7 @@ + Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresOutputProperties.cs =================================================================== diff -u --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresOutputProperties.cs (revision 0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresOutputProperties.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,58 @@ +// 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 Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.StabilityPointStructures.Data; + +namespace Ringtoets.StabilityPointStructures.Forms.PropertyClasses +{ + /// + /// ViewModel of stability point structures for properties panel. + /// + public class StabilityPointStructuresOutputProperties : StructuresOutputProperties + { + /// + /// Creates a new instance of . + /// + /// The structures output to create the object properties for. + /// The failure mechanism the output belongs to. + /// The assessment section the output belongs to. + /// Thrown when any parameter is null. + public StabilityPointStructuresOutputProperties(StructuresOutput structuresOutput, + StabilityPointStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(structuresOutput) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + } + } +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj =================================================================== diff -u -r24e2537b4196c44643459f11f568970b17979316 -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision 24e2537b4196c44643459f11f568970b17979316) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -29,6 +29,7 @@ + UserControl Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresOutputPropertiesTest.cs =================================================================== diff -u --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresOutputPropertiesTest.cs (revision 0) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresOutputPropertiesTest.cs (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -0,0 +1,84 @@ +// 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 NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.PropertyClasses; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Forms.PropertyClasses; + +namespace Ringtoets.StabilityPointStructures.Forms.Test.PropertyClasses +{ + [TestFixture] + public class StabilityPointStructuresOutputPropertiesTest + { + [Test] + public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + // Call + TestDelegate call = () => new StabilityPointStructuresOutputProperties(new TestStructuresOutput(), null, assessmentSection); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("failureMechanism", exception.ParamName); + mocks.VerifyAll(); + } + + [Test] + public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new StabilityPointStructuresOutputProperties(new TestStructuresOutput(), new StabilityPointStructuresFailureMechanism(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var output = new TestStructuresOutput(); + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + + // Call + var properties = new StabilityPointStructuresOutputProperties(output, failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf(properties); + Assert.AreSame(output, properties.Data); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj =================================================================== diff -u -r24e2537b4196c44643459f11f568970b17979316 -r7ec3c942280c558bf69d4b92a3610fcdbf29899c --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision 24e2537b4196c44643459f11f568970b17979316) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision 7ec3c942280c558bf69d4b92a3610fcdbf29899c) @@ -35,6 +35,7 @@ +