Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationContextTest.cs =================================================================== diff -u -r33efdf255d012f47a045c7f3181487e0453cf5e2 -rb04aec5d2e0dbedb3badb9aee6cb533f1efbf543 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationContextTest.cs (.../GrassCoverErosionInwardsCalculationContextTest.cs) (revision 33efdf255d012f47a045c7f3181487e0453cf5e2) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationContextTest.cs (.../GrassCoverErosionInwardsCalculationContextTest.cs) (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -44,7 +44,8 @@ public void ConstructorWithData_Always_ExpectedPropertiesSet() { // Setup - var calculationMock = mocksRepository.StrictMock(new GeneralGrassCoverErosionInwardsInput(), + var calculationMock = mocksRepository.StrictMock( + new GeneralGrassCoverErosionInwardsInput(), new GeneralNormProbabilityInput()); var failureMechanismMock = mocksRepository.StrictMock(); var assessmentSectionMock = mocksRepository.StrictMock(); @@ -59,22 +60,5 @@ Assert.AreEqual(assessmentSectionMock, context.AssessmentSection); mocksRepository.VerifyAll(); } - - [Test] - public void Constructor_NullCalculation_ThrowsArgumentNullException() - { - // Setup - var failureMechanismMock = mocksRepository.StrictMock(); - var assessmentSectionMock = mocksRepository.StrictMock(); - mocksRepository.ReplayAll(); - - // Call - TestDelegate test = () => new GrassCoverErosionInwardsCalculationContext(null, failureMechanismMock, assessmentSectionMock); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("wrappedData", exception.ParamName); - mocksRepository.VerifyAll(); - } } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs =================================================================== diff -u --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (revision 0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -0,0 +1,58 @@ +// 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 Core.Common.Base; +using Ringtoets.Common.Data.Calculation; + +namespace Ringtoets.HeightStructures.Data +{ + /// + /// This class holds the height structures information which can be made visible in the graphical interface of the application. + /// + public class HeightStructuresCalculation : Observable, ICalculation + { + public string Name { get; set; } + + public string Comments { get; set; } + + public bool HasOutput + { + get + { + return false; + } + } + + public void ClearOutput() {} + + public void ClearHydraulicBoundaryLocation() {} + + public ICalculationInput GetObservableInput() + { + return null; + } + + public ICalculationOutput GetObservableOutput() + { + return null; + } + } +} \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj =================================================================== diff -u -r213b20e92891887167ab4b031ca4a4b6250a4c2a -rb04aec5d2e0dbedb3badb9aee6cb533f1efbf543 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision 213b20e92891887167ab4b031ca4a4b6250a4c2a) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -39,6 +39,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs =================================================================== diff -u --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (revision 0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -0,0 +1,45 @@ +// 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 System; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HeightStructures.Data; + +namespace Ringtoets.HeightStructures.Forms.PresentationObjects +{ + /// + /// Presentation object for all data required to configure an instance of + /// in order to prepare it for performing a calculation. + /// + public class HeightStructuresCalculationContext : HeightStructuresContext, ICalculationContext + { + /// + /// Creates a new instance of . + /// + /// The instance wrapped by this context object. + /// The failure mechanism which the context belongs to. + /// The assessment section which the calculation belongs to. + /// Thrown when any input parameter is null. + public HeightStructuresCalculationContext(HeightStructuresCalculation calculation, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) + : base(calculation, failureMechanism, assessmentSection) { } + } +} Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj =================================================================== diff -u -r9c97b82cdd55ddd5fbe5143110bbbbf576bda162 -rb04aec5d2e0dbedb3badb9aee6cb533f1efbf543 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision 9c97b82cdd55ddd5fbe5143110bbbbf576bda162) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -39,6 +39,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs =================================================================== diff -u --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (revision 0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -0,0 +1,60 @@ +// 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 Rhino.Mocks; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.HeightStructures.Data; +using Ringtoets.HeightStructures.Forms.PresentationObjects; + +namespace Ringtoets.HeightStructures.Forms.Test.PresentationObjects +{ + [TestFixture] + public class HeightStructuresCalculationContextTest + { + private MockRepository mocksRepository; + + [SetUp] + public void SetUp() + { + mocksRepository = new MockRepository(); + } + + [Test] + public void ConstructorWithData_Always_ExpectedPropertiesSet() + { + // Setup + var calculationMock = mocksRepository.StrictMock(); + var failureMechanismMock = mocksRepository.StrictMock(); + var assessmentSectionMock = mocksRepository.StrictMock(); + mocksRepository.ReplayAll(); + + // Call + var context = new HeightStructuresCalculationContext(calculationMock, failureMechanismMock, assessmentSectionMock); + + // Assert + Assert.AreEqual(calculationMock, context.WrappedData); + Assert.AreEqual(failureMechanismMock, context.FailureMechanism); + Assert.AreEqual(assessmentSectionMock, context.AssessmentSection); + mocksRepository.VerifyAll(); + } + } +} Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj =================================================================== diff -u -rb4bb9d9f038ead7c2720a2ffc39c8522c9f9c028 -rb04aec5d2e0dbedb3badb9aee6cb533f1efbf543 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision b4bb9d9f038ead7c2720a2ffc39c8522c9f9c028) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision b04aec5d2e0dbedb3badb9aee6cb533f1efbf543) @@ -51,6 +51,7 @@ +