Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs
===================================================================
diff -u -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs (.../ClosingStructuresCalculationContext.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs (.../ClosingStructuresCalculationContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -30,7 +30,7 @@
/// Presentation object for all data required to configure an instance of
/// in order to prepare it for performing a calculation.
///
- public class ClosingStructuresCalculationContext : ClosingStructuresContextBase,
+ public class ClosingStructuresCalculationContext : StructuresContextBase,
ICalculationContext
{
///
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs
===================================================================
diff -u -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs (.../ClosingStructuresCalculationGroupContext.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs (.../ClosingStructuresCalculationGroupContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -31,15 +31,15 @@
/// Presentation object for all data required to configure an instance of
/// in order to be able to create configurable closing structures calculations.
///
- public class ClosingStructuresCalculationGroupContext : ClosingStructuresContextBase,
+ public class ClosingStructuresCalculationGroupContext : StructuresContextBase,
ICalculationContext
{
///
/// Creates a new instance of .
///
/// The instance that is wrapped by this context object.
/// The failure mechanism which contains the calculation group.
- /// The assessment section which containts the calculation group.
+ /// The assessment section which contains the calculation group.
/// Thrown when any of the input parameters are null.
public ClosingStructuresCalculationGroupContext(CalculationGroup calculationGroup,
ClosingStructuresFailureMechanism failureMechanism,
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresContextBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs
===================================================================
diff -u -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (.../ClosingStructuresInputContext.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (.../ClosingStructuresInputContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -22,14 +22,15 @@
using System;
using Ringtoets.ClosingStructures.Data;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
namespace Ringtoets.ClosingStructures.Forms.PresentationObjects
{
///
/// Presentation object for all data required to configure an instance of
/// in order to be able to configure closing structures calculations.
///
- public class ClosingStructuresInputContext : ClosingStructuresContextBase
+ public class ClosingStructuresInputContext : StructuresContextBase
{
///
/// Creates a new instance of .
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj
===================================================================
diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -46,7 +46,6 @@
-
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs
===================================================================
diff -u -r9214f74184b5923e0fb04b86d50c5bf8e5e57cdc -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs (.../ClosingStructuresCalculationContextTest.cs) (revision 9214f74184b5923e0fb04b86d50c5bf8e5e57cdc)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs (.../ClosingStructuresCalculationContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -46,7 +46,7 @@
var context = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.IsInstanceOf>(context);
Assert.AreEqual(calculation, context.WrappedData);
Assert.AreEqual(failureMechanism, context.FailureMechanism);
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationGroupContextTest.cs
===================================================================
diff -u -r8587508c66a1bc0938465e97cf365cc1ef254f53 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationGroupContextTest.cs (.../ClosingStructuresCalculationGroupContextTest.cs) (revision 8587508c66a1bc0938465e97cf365cc1ef254f53)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationGroupContextTest.cs (.../ClosingStructuresCalculationGroupContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -47,12 +47,12 @@
var groupContext = new ClosingStructuresCalculationGroupContext(calculationGroup, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(groupContext);
+ Assert.IsInstanceOf>(groupContext);
Assert.IsInstanceOf>(groupContext);
Assert.AreSame(calculationGroup, groupContext.WrappedData);
Assert.AreSame(failureMechanism, groupContext.FailureMechanism);
Assert.AreSame(assessmentSectionMock, groupContext.AssessmentSection);
mockRepository.VerifyAll();
}
}
-}
+}
\ No newline at end of file
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresContextBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs
===================================================================
diff -u -ree5ab18ca7554ffb2ce9546dd72b341da59f0345 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs (.../ClosingStructuresInputContextTest.cs) (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs (.../ClosingStructuresInputContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -24,6 +24,7 @@
using Ringtoets.ClosingStructures.Data;
using Ringtoets.ClosingStructures.Forms.PresentationObjects;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
namespace Ringtoets.ClosingStructures.Forms.Test.PresentationObjects
{
@@ -45,7 +46,7 @@
var context = new ClosingStructuresInputContext(input, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.AreEqual(input, context.WrappedData);
Assert.AreEqual(failureMechanism, context.FailureMechanism);
Assert.AreEqual(assessmentSectionMock, context.AssessmentSection);
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj
===================================================================
diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -64,7 +64,6 @@
-
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/StructuresContextBase.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/StructuresContextBase.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/StructuresContextBase.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,92 @@
+// 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 System.Collections.Generic;
+using System.Linq;
+using Core.Common.Base;
+using Core.Common.Controls.PresentationObjects;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Forms.PresentationObjects
+{
+ ///
+ /// Presentation object representing all required structures input knowledge to configure and create
+ /// related objects. It'll delegate observable behavior to the wrapped data object.
+ ///
+ /// The type of the data wrapped by the context object.
+ /// The type of the failure mechanism which the context belongs to.
+ public abstract class StructuresContextBase : ObservableWrappedObjectContextBase
+ where TData : IObservable
+ where TFailureMechanism : IFailureMechanism
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The concrete data instance wrapped by this context object.
+ /// The failure mechanism which the context belongs to.
+ /// The assessment section which the context belongs to.
+ /// When any input argument is null.
+ protected StructuresContextBase(TData wrappedData,
+ TFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ : base(wrappedData)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException("failureMechanism");
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException("assessmentSection");
+ }
+
+ FailureMechanism = failureMechanism;
+ AssessmentSection = assessmentSection;
+ }
+
+ ///
+ /// Gets the failure mechanism which the context belongs to.
+ ///
+ public TFailureMechanism FailureMechanism { get; private set; }
+
+ ///
+ /// Gets the assessment section which the context belongs to.
+ ///
+ public IAssessmentSection AssessmentSection { get; private set; }
+
+ ///
+ /// Gets the available hydraulic boundary locations.
+ ///
+ public IEnumerable AvailableHydraulicBoundaryLocations
+ {
+ get
+ {
+ return AssessmentSection.HydraulicBoundaryDatabase != null
+ ? AssessmentSection.HydraulicBoundaryDatabase.Locations
+ : Enumerable.Empty();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -63,6 +63,7 @@
+
@@ -99,6 +100,12 @@
Form
+
+
+
+
+
+
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -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 System.Collections.Generic;
+using System.ComponentModel;
+using Core.Common.Utils.Reflection;
+using Ringtoets.Common.Data.DikeProfiles;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// This class defines a drop down list edit-control from which the user can select a
+ /// foreshore profile from a collection.
+ ///
+ public class ForeshoreProfileEditor : SelectionEditor
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ public ForeshoreProfileEditor()
+ {
+ DisplayMember = TypeUtils.GetMemberName(fp => fp.Name);
+ }
+
+ protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).GetAvailableForeshoreProfiles();
+ }
+
+ protected override ForeshoreProfile GetCurrentOption(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).ForeshoreProfile;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/HydraulicBoundaryLocationEditor.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/HydraulicBoundaryLocationEditor.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/HydraulicBoundaryLocationEditor.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -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 System.Collections.Generic;
+using System.ComponentModel;
+using Core.Common.Utils.Reflection;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// This class defines a drop down list edit-control from which the user can select a
+ /// hydraulic boundary location from a collection.
+ ///
+ public class HydraulicBoundaryLocationEditor : SelectionEditor
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ public HydraulicBoundaryLocationEditor()
+ {
+ DisplayMember = TypeUtils.GetMemberName(hbl => hbl.Name);
+ }
+
+ protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).GetAvailableHydraulicBoundaryLocations();
+ }
+
+ protected override HydraulicBoundaryLocation GetCurrentOption(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).HydraulicBoundaryLocation;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasForeshoreProfileProperty.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasForeshoreProfileProperty.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasForeshoreProfileProperty.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,44 @@
+// 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.Collections.Generic;
+using Core.Common.Gui.PropertyBag;
+using Ringtoets.Common.Data.DikeProfiles;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// Interface for with a foreshore profile property.
+ ///
+ public interface IHasForeshoreProfileProperty : IObjectProperties
+ {
+ ///
+ /// Gets the selected foreshore profile.
+ ///
+ ForeshoreProfile ForeshoreProfile { get; }
+
+ ///
+ /// Returns the collection of available foreshore profiles.
+ ///
+ /// A collection of foreshore profiles.
+ IEnumerable GetAvailableForeshoreProfiles();
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasHydraulicBoundaryLocationProperty.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasHydraulicBoundaryLocationProperty.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasHydraulicBoundaryLocationProperty.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,44 @@
+// 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.Collections.Generic;
+using Core.Common.Gui.PropertyBag;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// Interface for with a hydraulic boundary location property.
+ ///
+ public interface IHasHydraulicBoundaryLocationProperty : IObjectProperties
+ {
+ ///
+ /// Gets the selected hydraulic boundary location.
+ ///
+ HydraulicBoundaryLocation HydraulicBoundaryLocation { get; }
+
+ ///
+ /// Returns the collection of available hydraulic boundary locations.
+ ///
+ /// A collection of hydraulic boundary locations.
+ IEnumerable GetAvailableHydraulicBoundaryLocations();
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasStructureProperty.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasStructureProperty.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/IHasStructureProperty.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -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.Collections.Generic;
+using Core.Common.Gui.PropertyBag;
+using Ringtoets.Common.Data;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// Interface for with a structure property.
+ ///
+ /// The type of structures at stake.
+ public interface IHasStructureProperty : IObjectProperties where T : StructureBase
+ {
+ ///
+ /// Gets the selected structure.
+ ///
+ T Structure { get; }
+
+ ///
+ /// Returns the collection of available structures.
+ ///
+ /// A collection of structures.
+ IEnumerable GetAvailableStructures();
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,54 @@
+// 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.Collections.Generic;
+using System.ComponentModel;
+using Core.Common.Utils.Reflection;
+using Ringtoets.Common.Data;
+
+namespace Ringtoets.Common.Forms.UITypeEditors
+{
+ ///
+ /// This class defines a drop down list edit-control from which the user can select a
+ /// structure from a collection.
+ ///
+ /// The type of structures at stake.
+ public class StructureEditor : SelectionEditor, T> where T : StructureBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ public StructureEditor()
+ {
+ DisplayMember = TypeUtils.GetMemberName(s => s.Name);
+ }
+
+ protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).GetAvailableStructures();
+ }
+
+ protected override T GetCurrentOption(ITypeDescriptorContext context)
+ {
+ return GetPropertiesObject(context).Structure;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/StructuresContextBaseTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/StructuresContextBaseTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/StructuresContextBaseTest.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,129 @@
+// 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 System.Linq;
+using Core.Common.Base;
+using Core.Common.Controls.PresentationObjects;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Forms.PresentationObjects;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Forms.Test.PresentationObjects
+{
+ [TestFixture]
+ public class StructuresContextBaseTest
+ {
+ [Test]
+ public void ParameteredConstructor_ExpectedValues()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionStub = mockRepository.Stub();
+ var observableStub = mockRepository.Stub();
+ var failureMechanismStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ // Call
+ var context = new SimpleStructuresContext(observableStub, failureMechanismStub, assessmentSectionStub);
+
+ // Assert
+ Assert.IsInstanceOf>(context);
+ Assert.AreSame(observableStub, context.WrappedData);
+ Assert.AreSame(failureMechanismStub, context.FailureMechanism);
+ Assert.AreSame(assessmentSectionStub, context.AssessmentSection);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_FailureMechanismIsNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionStub = mockRepository.Stub();
+ var observableStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ // Call
+ TestDelegate call = () => new SimpleStructuresContext(observableStub, null, assessmentSectionStub);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("failureMechanism", exception.ParamName);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_AssessmentSectionIsNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var observableStub = mockRepository.Stub();
+ var failureMechanismStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ // Call
+ TestDelegate call = () => new SimpleStructuresContext(observableStub, failureMechanismStub, null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void AvailableHydraulicBoundaryLocations_HydraulicBoundaryDatabaseSet_ReturnsAllHydraulicBoundaryLocations()
+ {
+ // Setup
+ var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase();
+ hydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "name", 1.1, 2.2));
+
+ var mockRepository = new MockRepository();
+ var assessmentSectionStub = mockRepository.Stub();
+ var observableStub = mockRepository.Stub();
+ var failureMechanismStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase;
+
+ var context = new SimpleStructuresContext(observableStub, failureMechanismStub, assessmentSectionStub);
+
+ // Call
+ var availableHydraulicBoundaryLocations = context.AvailableHydraulicBoundaryLocations;
+
+ // Assert
+ Assert.AreEqual(1, availableHydraulicBoundaryLocations.Count());
+ Assert.AreEqual(hydraulicBoundaryDatabase.Locations, availableHydraulicBoundaryLocations);
+ mockRepository.VerifyAll();
+ }
+
+ private class SimpleStructuresContext : StructuresContextBase
+ where TData : IObservable
+ where TFailureMechanism : IFailureMechanism
+ {
+ public SimpleStructuresContext(TData target, TFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
+ : base(target, failureMechanism, assessmentSection) {}
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj
===================================================================
diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -74,6 +74,7 @@
+
@@ -95,7 +96,10 @@
+
+
+
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/ForeshoreProfileEditorTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/ForeshoreProfileEditorTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/ForeshoreProfileEditorTest.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,130 @@
+// 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 System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Windows.Forms.Design;
+using Core.Common.Base.Geometry;
+using Core.Common.Gui.PropertyBag;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.DikeProfiles;
+using Ringtoets.Common.Forms.UITypeEditors;
+
+namespace Ringtoets.Common.Forms.Test.UITypeEditors
+{
+ [TestFixture]
+ public class ForeshoreProfileEditorTest
+ {
+ private MockRepository mockRepository;
+
+ [SetUp]
+ public void SetUp()
+ {
+ mockRepository = new MockRepository();
+ }
+
+ [Test]
+ public void EditValue_NoCurrentItemInAvailableItems_ReturnsOriginalValue()
+ {
+ // Setup
+ var foreshoreProfile = CreateForeshoreProfile();
+ var properties = new ObjectPropertiesWithForeshoreProfile(foreshoreProfile, new ForeshoreProfile[0]);
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new ForeshoreProfileEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(someValue, result);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void EditValue_WithCurrentItemInAvailableItems_ReturnsCurrentItem()
+ {
+ // Setup
+ var foreshoreProfile = CreateForeshoreProfile();
+ var properties = new ObjectPropertiesWithForeshoreProfile(foreshoreProfile, new[]
+ {
+ foreshoreProfile
+ });
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new ForeshoreProfileEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(foreshoreProfile, result);
+ mockRepository.VerifyAll();
+ }
+
+ private static ForeshoreProfile CreateForeshoreProfile()
+ {
+ return new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), new BreakWater(BreakWaterType.Caisson, 0.0), new ForeshoreProfile.ConstructionProperties());
+ }
+
+ private class ObjectPropertiesWithForeshoreProfile : IHasForeshoreProfileProperty
+ {
+ private readonly ForeshoreProfile foreshoreProfile;
+ private readonly IEnumerable availableForeshoreProfiles;
+
+ public ObjectPropertiesWithForeshoreProfile(ForeshoreProfile foreshoreProfile, IEnumerable availableForeshoreProfiles)
+ {
+ this.foreshoreProfile = foreshoreProfile;
+ this.availableForeshoreProfiles = availableForeshoreProfiles;
+ }
+
+ public object Data { get; set; }
+
+ public ForeshoreProfile ForeshoreProfile
+ {
+ get
+ {
+ return foreshoreProfile;
+ }
+ }
+
+ public IEnumerable GetAvailableForeshoreProfiles()
+ {
+ return availableForeshoreProfiles;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/HydraulicBoundaryLocationEditorTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/HydraulicBoundaryLocationEditorTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/HydraulicBoundaryLocationEditorTest.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,128 @@
+// 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 System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms.Design;
+using Core.Common.Gui.PropertyBag;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Forms.UITypeEditors;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Forms.Test.UITypeEditors
+{
+ [TestFixture]
+ public class HydraulicBoundaryLocationEditorTest
+ {
+ private MockRepository mockRepository;
+
+ [SetUp]
+ public void SetUp()
+ {
+ mockRepository = new MockRepository();
+ }
+
+ [Test]
+ public void EditValue_NoCurrentItemInAvailableItems_ReturnsOriginalValue()
+ {
+ // Setup
+ var hydraulicBoundaryLocation = CreateHydraulicBoundaryLocation();
+ var properties = new ObjectPropertiesWithHydraulicBoundaryLocation(hydraulicBoundaryLocation, new HydraulicBoundaryLocation[0]);
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new HydraulicBoundaryLocationEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(someValue, result);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void EditValue_WithCurrentItemInAvailableItems_ReturnsCurrentItem()
+ {
+ // Setup
+ var hydraulicBoundaryLocation = CreateHydraulicBoundaryLocation();
+ var properties = new ObjectPropertiesWithHydraulicBoundaryLocation(hydraulicBoundaryLocation, new[]
+ {
+ hydraulicBoundaryLocation
+ });
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new HydraulicBoundaryLocationEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(hydraulicBoundaryLocation, result);
+ mockRepository.VerifyAll();
+ }
+
+ private static HydraulicBoundaryLocation CreateHydraulicBoundaryLocation()
+ {
+ return new HydraulicBoundaryLocation(1, "", 0, 0);
+ }
+
+ private class ObjectPropertiesWithHydraulicBoundaryLocation : IHasHydraulicBoundaryLocationProperty
+ {
+ private readonly HydraulicBoundaryLocation hydraulicBoundaryLocation;
+ private readonly IEnumerable availableHydraulicBoundaryLocations;
+
+ public ObjectPropertiesWithHydraulicBoundaryLocation(HydraulicBoundaryLocation hydraulicBoundaryLocation, IEnumerable availableHydraulicBoundaryLocations)
+ {
+ this.hydraulicBoundaryLocation = hydraulicBoundaryLocation;
+ this.availableHydraulicBoundaryLocations = availableHydraulicBoundaryLocations;
+ }
+
+ public object Data { get; set; }
+
+ public HydraulicBoundaryLocation HydraulicBoundaryLocation
+ {
+ get
+ {
+ return hydraulicBoundaryLocation;
+ }
+ }
+
+ public IEnumerable GetAvailableHydraulicBoundaryLocations()
+ {
+ return availableHydraulicBoundaryLocations;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/StructureEditorTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/StructureEditorTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UITypeEditors/StructureEditorTest.cs (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -0,0 +1,129 @@
+// 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 System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms.Design;
+using Core.Common.Base.Geometry;
+using Core.Common.Gui.PropertyBag;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data;
+using Ringtoets.Common.Forms.UITypeEditors;
+
+namespace Ringtoets.Common.Forms.Test.UITypeEditors
+{
+ [TestFixture]
+ public class StructureEditorTest
+ {
+ private MockRepository mockRepository;
+
+ [SetUp]
+ public void SetUp()
+ {
+ mockRepository = new MockRepository();
+ }
+
+ [Test]
+ public void EditValue_NoCurrentItemInAvailableItems_ReturnsOriginalValue()
+ {
+ // Setup
+ var simpleStructure = new SimpleStructure();
+ var properties = new ObjectPropertiesWithStructure(simpleStructure, new SimpleStructure[0]);
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new StructureEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(someValue, result);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void EditValue_WithCurrentItemInAvailableItems_ReturnsCurrentItem()
+ {
+ // Setup
+ var simpleStructure = new SimpleStructure();
+ var properties = new ObjectPropertiesWithStructure(simpleStructure, new[]
+ {
+ simpleStructure
+ });
+ var propertyBag = new DynamicPropertyBag(properties);
+ var editor = new StructureEditor();
+ var someValue = new object();
+ var serviceProviderMock = mockRepository.Stub();
+ var serviceMock = mockRepository.Stub();
+ var descriptorContextMock = mockRepository.Stub();
+ serviceProviderMock.Stub(p => p.GetService(null)).IgnoreArguments().Return(serviceMock);
+ descriptorContextMock.Stub(c => c.Instance).Return(propertyBag);
+ mockRepository.ReplayAll();
+
+ // Call
+ var result = editor.EditValue(descriptorContextMock, serviceProviderMock, someValue);
+
+ // Assert
+ Assert.AreSame(simpleStructure, result);
+ mockRepository.VerifyAll();
+ }
+
+ private class SimpleStructure : StructureBase
+ {
+ public SimpleStructure() : base("Name", "Id", new Point2D(0, 0), 0.0) {}
+ }
+
+ private class ObjectPropertiesWithStructure : IHasStructureProperty
+ {
+ private readonly SimpleStructure structure;
+ private readonly IEnumerable availableStructures;
+
+ public ObjectPropertiesWithStructure(SimpleStructure structure, IEnumerable availableStructures)
+ {
+ this.structure = structure;
+ this.availableStructures = availableStructures;
+ }
+
+ public object Data { get; set; }
+
+ public SimpleStructure Structure
+ {
+ get
+ {
+ return structure;
+ }
+ }
+
+ public IEnumerable GetAvailableStructures()
+ {
+ return availableStructures;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs
===================================================================
diff -u -r38600213ce6ca43c1819c81dd95c8ce786650ac3 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs (.../GrassCoverErosionInwardsInputContextProperties.cs) (revision 38600213ce6ca43c1819c81dd95c8ce786650ac3)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs (.../GrassCoverErosionInwardsInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -29,6 +29,7 @@
using Core.Common.Utils.Attributes;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
using Ringtoets.GrassCoverErosionInwards.Forms.Properties;
using Ringtoets.GrassCoverErosionInwards.Forms.UITypeEditors;
@@ -41,7 +42,8 @@
///
/// ViewModel of for properties panel.
///
- public class GrassCoverErosionInwardsInputContextProperties : ObjectProperties
+ public class GrassCoverErosionInwardsInputContextProperties : ObjectProperties,
+ IHasHydraulicBoundaryLocationProperty
{
private const int dikeProfilePropertyIndex = 1;
private const int worldReferencePointPropertyIndex = 2;
@@ -202,7 +204,7 @@
}
[PropertyOrder(hydraulicBoundaryLocationPropertyIndex)]
- [Editor(typeof(GrassCoverErosionInwardsInputContextHydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
+ [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")]
@@ -225,6 +227,10 @@
return data.WrappedData.DikeProfile == null;
}
+ ///
+ /// Returns the collection of available dike profiles.
+ ///
+ /// A collection of dike profiles.
public IEnumerable GetAvailableDikeProfiles()
{
return data.AvailableDikeProfiles;
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj
===================================================================
diff -u -r04e2ad28172dab2091ef18840dfc0ba77c6c0c7d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision 04e2ad28172dab2091ef18840dfc0ba77c6c0c7d)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -67,7 +67,6 @@
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/UITypeEditors/GrassCoverErosionInwardsInputContextHydraulicBoundaryLocationEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs
===================================================================
diff -u -re570ba372fafe1802a4caae2ef9410b64457198b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision e570ba372fafe1802a4caae2ef9410b64457198b)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -30,6 +30,7 @@
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.GrassCoverErosionInwards.Data;
using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
using Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses;
@@ -66,6 +67,7 @@
// Assert
Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf(properties);
Assert.IsNull(properties.Data);
}
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj
===================================================================
diff -u -raa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision aa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -86,7 +86,6 @@
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/UITypeEditors/GrassCoverErosionInwardsInputContextHydraulicBoundaryLocationEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs
===================================================================
diff -u -r438a524144f283209902ae89f058a134380c9538 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (.../HeightStructuresCalculationContext.cs) (revision 438a524144f283209902ae89f058a134380c9538)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (.../HeightStructuresCalculationContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -30,7 +30,7 @@
/// Presentation object for all data required to configure an instance of
/// in order to prepare it for performing a calculation.
///
- public class HeightStructuresCalculationContext : HeightStructuresContextBase,
+ public class HeightStructuresCalculationContext : StructuresContextBase,
ICalculationContext
{
///
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationGroupContext.cs
===================================================================
diff -u -r438a524144f283209902ae89f058a134380c9538 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationGroupContext.cs (.../HeightStructuresCalculationGroupContext.cs) (revision 438a524144f283209902ae89f058a134380c9538)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationGroupContext.cs (.../HeightStructuresCalculationGroupContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -31,7 +31,7 @@
/// Presentation object for all data required to configure an instance of
/// in order be able to create configurable height structures calculations.
///
- public class HeightStructuresCalculationGroupContext : HeightStructuresContextBase,
+ public class HeightStructuresCalculationGroupContext : StructuresContextBase,
ICalculationContext
{
///
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresContextBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs
===================================================================
diff -u -r04e2ad28172dab2091ef18840dfc0ba77c6c0c7d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision 04e2ad28172dab2091ef18840dfc0ba77c6c0c7d)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -21,6 +21,7 @@
using System;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.HeightStructures.Data;
namespace Ringtoets.HeightStructures.Forms.PresentationObjects
@@ -29,7 +30,7 @@
/// Presentation object for all data required to configure an instance of
/// in order to be able to configure height structures calculations.
///
- public class HeightStructuresInputContext : HeightStructuresContextBase
+ public class HeightStructuresInputContext : StructuresContextBase
{
///
/// Creates a new instance of .
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs
===================================================================
diff -u -r6e68772763eff7e38ef3e2c4dcfcbc18aff21cd4 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 6e68772763eff7e38ef3e2c4dcfcbc18aff21cd4)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -31,10 +31,10 @@
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HeightStructures.Data;
using Ringtoets.HeightStructures.Forms.PresentationObjects;
using Ringtoets.HeightStructures.Forms.Properties;
-using Ringtoets.HeightStructures.Forms.UITypeEditors;
using Ringtoets.HeightStructures.Utils;
using Ringtoets.HydraRing.Data;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
@@ -44,7 +44,10 @@
///
/// ViewModel of for properties panel.
///
- public class HeightStructuresInputContextProperties : ObjectProperties
+ public class HeightStructuresInputContextProperties : ObjectProperties,
+ IHasStructureProperty,
+ IHasForeshoreProfileProperty,
+ IHasHydraulicBoundaryLocationProperty
{
private const int heightStructurePropertyIndex = 1;
private const int heightStructureLocationPropertyIndex = 2;
@@ -84,44 +87,29 @@
#endregion
- ///
- /// Returns the available hydraulic boundary locations in order for the user to select one to
- /// set .
- ///
- /// The available hydraulic boundary locations.
+ public IEnumerable GetAvailableForeshoreProfiles()
+ {
+ return data.FailureMechanism.ForeshoreProfiles;
+ }
+
public IEnumerable GetAvailableHydraulicBoundaryLocations()
{
return data.AvailableHydraulicBoundaryLocations;
}
- ///
- /// Returns the available height structures in order for the user to select one to
- /// set .
- ///
- /// The available height structures.
- public IEnumerable GetAvailableHeightStructures()
+ public IEnumerable GetAvailableStructures()
{
return data.FailureMechanism.HeightStructures;
}
- ///
- /// Returns the available foreshore profiles in order for the user to select one to
- /// set .
- ///
- /// The available foreshore profiles.
- public IEnumerable GetAvailableForeshoreProfiles()
- {
- return data.FailureMechanism.ForeshoreProfiles;
- }
-
#region Schematization
[PropertyOrder(heightStructurePropertyIndex)]
- [Editor(typeof(HeightStructuresInputContextStructureEditor), typeof(UITypeEditor))]
+ [Editor(typeof(StructureEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")]
[ResourcesDisplayName(typeof(Resources), "Structure_DisplayName")]
[ResourcesDescription(typeof(Resources), "Structure_Description")]
- public HeightStructure HeightStructure
+ public HeightStructure Structure
{
get
{
@@ -296,7 +284,7 @@
}
[PropertyOrder(foreshoreProfilePropertyIndex)]
- [Editor(typeof(HeightStructuresInputContextForeshoreProfileEditor), typeof(UITypeEditor))]
+ [Editor(typeof(ForeshoreProfileEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")]
[ResourcesDisplayName(typeof(Resources), "ForeshoreProfile_DisplayName")]
[ResourcesDescription(typeof(Resources), "ForeshoreProfile_Description")]
@@ -346,7 +334,7 @@
#region Hydraulic data
[PropertyOrder(hydraulicBoundaryLocationPropertyIndex)]
- [Editor(typeof(HeightStructuresInputContextHydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
+ [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")]
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj
===================================================================
diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Ringtoets.HeightStructures.Forms.csproj (.../Ringtoets.HeightStructures.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -45,7 +45,6 @@
-
@@ -60,9 +59,6 @@
Form
-
-
-
UserControl
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/UITypeEditors/HeightStructuresInputContextForeshoreProfileEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/UITypeEditors/HeightStructuresInputContextHydraulicBoundaryLocationEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/UITypeEditors/HeightStructuresInputContextStructureEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs
===================================================================
diff -u -r9214f74184b5923e0fb04b86d50c5bf8e5e57cdc -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision 9214f74184b5923e0fb04b86d50c5bf8e5e57cdc)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -46,7 +46,7 @@
var context = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.IsInstanceOf>(context);
Assert.AreEqual(calculation, context.WrappedData);
Assert.AreEqual(failureMechanism, context.FailureMechanism);
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationGroupContextTest.cs
===================================================================
diff -u -rdd72cf407b7d0e9284d101bb2e2854e569b1a29a -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationGroupContextTest.cs (.../HeightStructuresCalculationGroupContextTest.cs) (revision dd72cf407b7d0e9284d101bb2e2854e569b1a29a)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationGroupContextTest.cs (.../HeightStructuresCalculationGroupContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -47,7 +47,7 @@
var groupContext = new HeightStructuresCalculationGroupContext(calculationGroup, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(groupContext);
+ Assert.IsInstanceOf>(groupContext);
Assert.IsInstanceOf>(groupContext);
Assert.AreSame(calculationGroup, groupContext.WrappedData);
Assert.AreSame(failureMechanism, groupContext.FailureMechanism);
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresContextBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs
===================================================================
diff -u -r53785e0fd2752f08a43b649e0c4cd56955ec374d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision 53785e0fd2752f08a43b649e0c4cd56955ec374d)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -23,6 +23,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.HeightStructures.Data;
using Ringtoets.HeightStructures.Forms.PresentationObjects;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
@@ -66,7 +67,7 @@
var context = new HeightStructuresInputContext(calculation, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.AreSame(calculation.InputParameters, context.WrappedData);
Assert.AreSame(calculation, context.Calculation);
Assert.AreSame(failureMechanism, context.FailureMechanism);
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs
===================================================================
diff -u -re570ba372fafe1802a4caae2ef9410b64457198b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision e570ba372fafe1802a4caae2ef9410b64457198b)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -36,6 +36,7 @@
using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HeightStructures.Data;
using Ringtoets.HeightStructures.Data.TestUtil;
using Ringtoets.HeightStructures.Forms.PresentationObjects;
@@ -81,6 +82,9 @@
// Assert
Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf(properties);
+ Assert.IsInstanceOf(properties);
Assert.IsNull(properties.Data);
}
@@ -104,7 +108,7 @@
HeightStructuresInput input = calculation.InputParameters;
var expectedFailureProbabilityStructureWithErosion = ProbabilityFormattingHelper.Format(input.FailureProbabilityStructureWithErosion);
- Assert.IsNull(properties.HeightStructure);
+ Assert.IsNull(properties.Structure);
Assert.IsNull(properties.HeightStructureLocation);
Assert.AreSame(input.ModelFactorSuperCriticalFlow, properties.ModelFactorSuperCriticalFlow.Data);
Assert.AreEqual(input.StructureNormalOrientation, properties.StructureNormalOrientation);
@@ -174,7 +178,7 @@
var expectedHeightStructureLocation = new Point2D(new RoundedDouble(0, input.Structure.Location.X), new RoundedDouble(0, input.Structure.Location.Y));
var expectedFailureProbabilityStructureWithErosion = ProbabilityFormattingHelper.Format(input.FailureProbabilityStructureWithErosion);
- Assert.AreSame(input.Structure, properties.HeightStructure);
+ Assert.AreSame(input.Structure, properties.Structure);
Assert.AreEqual(expectedHeightStructureLocation, properties.HeightStructureLocation);
Assert.AreSame(input.ModelFactorSuperCriticalFlow, properties.ModelFactorSuperCriticalFlow.Data);
Assert.AreEqual(input.StructureNormalOrientation, properties.StructureNormalOrientation);
@@ -195,8 +199,8 @@
Assert.AreEqual(1, properties.GetAvailableHydraulicBoundaryLocations().Count());
CollectionAssert.AreEqual(inputContext.AvailableHydraulicBoundaryLocations, properties.GetAvailableHydraulicBoundaryLocations());
- Assert.AreEqual(1, properties.GetAvailableHeightStructures().Count());
- CollectionAssert.AreEqual(failureMechanism.HeightStructures, properties.GetAvailableHeightStructures());
+ Assert.AreEqual(1, properties.GetAvailableStructures().Count());
+ CollectionAssert.AreEqual(failureMechanism.HeightStructures, properties.GetAvailableStructures());
Assert.AreEqual(1, properties.GetAvailableForeshoreProfiles().Count());
CollectionAssert.AreEqual(failureMechanism.ForeshoreProfiles, properties.GetAvailableForeshoreProfiles());
@@ -232,15 +236,15 @@
double newDeviationWaveDirection = random.NextDouble();
// Call
- properties.HeightStructure = newHeightStructure;
+ properties.Structure = newHeightStructure;
properties.StructureNormalOrientation = (RoundedDouble) newStructureNormalOrientation;
properties.FailureProbabilityStructureWithErosion = "1e-2";
properties.HydraulicBoundaryLocation = hydraulicBoundaryLocation;
properties.ForeshoreProfile = newForeshoreProfile;
properties.DeviationWaveDirection = (RoundedDouble) newDeviationWaveDirection;
// Assert
- Assert.AreSame(newHeightStructure, properties.HeightStructure);
+ Assert.AreSame(newHeightStructure, properties.Structure);
Assert.AreEqual(newStructureNormalOrientation, properties.StructureNormalOrientation,
properties.StructureNormalOrientation.GetAccuracy());
Assert.AreEqual(0.01, input.FailureProbabilityStructureWithErosion);
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj
===================================================================
diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -64,7 +64,6 @@
-
@@ -81,9 +80,6 @@
-
-
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextForeshoreProfileEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextHydraulicBoundaryLocationEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextStructureEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs
===================================================================
diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -26,6 +26,7 @@
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Common.Data.Probabilistics;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HydraRing.Data;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PresentationObjects;
@@ -41,7 +42,8 @@
///
/// ViewModel of for properties panel.
///
- public class PipingInputContextProperties : ObjectProperties
+ public class PipingInputContextProperties : ObjectProperties,
+ IHasHydraulicBoundaryLocationProperty
{
///
/// Gets the available surface lines on .
@@ -67,17 +69,14 @@
return data.WrappedData.StochasticSoilModel != null ? data.WrappedData.StochasticSoilModel.StochasticSoilProfiles : new List();
}
- ///
- /// Gets the available hydraulic boundary locations on .
- ///
public IEnumerable GetAvailableHydraulicBoundaryLocations()
{
return data.AvailableHydraulicBoundaryLocations;
}
#region Hydraulic data
- [Editor(typeof(PipingInputContextHydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
+ [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")]
[ResourcesDisplayName(typeof(Resources), "PipingInput_HydraulicBoundaryLocation_DisplayName")]
[ResourcesDescription(typeof(Resources), "PipingInput_HydraulicBoundaryLocation_Description")]
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj
===================================================================
diff -u -red80cd8fb7d91c419ca42f706625e77ae014339e -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision ed80cd8fb7d91c419ca42f706625e77ae014339e)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -84,7 +84,6 @@
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Forms/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs
===================================================================
diff -u -re570ba372fafe1802a4caae2ef9410b64457198b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision e570ba372fafe1802a4caae2ef9410b64457198b)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -32,6 +32,7 @@
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Probabilistics;
using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HydraRing.Data;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PresentationObjects;
@@ -54,6 +55,7 @@
// Assert
Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf(properties);
Assert.IsNull(properties.Data);
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj
===================================================================
diff -u -rd58a7ff7f54c83dfe5d1ef28417c43a83346b5ba -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision d58a7ff7f54c83dfe5d1ef28417c43a83346b5ba)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -98,7 +98,6 @@
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/IWaveConditionsInputContextProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs
===================================================================
diff -u -rccf22c570f610fc47e18f8e92afc6aab2ee6c896 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision ccf22c570f610fc47e18f8e92afc6aab2ee6c896)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -32,19 +32,21 @@
using Core.Common.Utils.Attributes;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HydraRing.Data;
using Ringtoets.Revetment.Data;
using Ringtoets.Revetment.Forms.PresentationObjects;
using Ringtoets.Revetment.Forms.Properties;
-using Ringtoets.Revetment.Forms.UITypeEditors;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
namespace Ringtoets.Revetment.Forms.PropertyClasses
{
///
/// ViewModel of for properties panel.
///
- public abstract class WaveConditionsInputContextProperties : ObjectProperties, IWaveConditionsInputContextProperties
+ public abstract class WaveConditionsInputContextProperties : ObjectProperties,
+ IHasHydraulicBoundaryLocationProperty,
+ IHasForeshoreProfileProperty
where T : WaveConditionsInputContext
{
private const int hydraulicBoundaryLocationPropertyIndex = 0;
@@ -254,7 +256,7 @@
public abstract string RevetmentType { get; }
[PropertyOrder(hydraulicBoundaryLocationPropertyIndex)]
- [Editor(typeof(WaveConditionsInputContextHydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
+ [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_DisplayName")]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), "HydraulicBoundaryLocation_Description")]
@@ -272,7 +274,7 @@
}
[PropertyOrder(foreshoreProfilePropertyIndex)]
- [Editor(typeof(WaveConditionsInputContextForeshoreProfileEditor), typeof(UITypeEditor))]
+ [Editor(typeof(ForeshoreProfileEditor), typeof(UITypeEditor))]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")]
[ResourcesDisplayName(typeof(Resources), "ForeshoreProfile_DisplayName")]
[ResourcesDescription(typeof(Resources), "ForeshoreProfile_Description")]
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj
===================================================================
diff -u -raa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision aa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -43,7 +43,6 @@
-
True
@@ -52,8 +51,6 @@
-
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditor.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs
===================================================================
diff -u -re570ba372fafe1802a4caae2ef9410b64457198b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision e570ba372fafe1802a4caae2ef9410b64457198b)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -34,6 +34,7 @@
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PropertyClasses;
+using Ringtoets.Common.Forms.UITypeEditors;
using Ringtoets.HydraRing.Data;
using Ringtoets.Revetment.Data;
using Ringtoets.Revetment.Forms.PresentationObjects;
@@ -69,7 +70,8 @@
// Assert
Assert.IsInstanceOf>(properties);
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf(properties);
+ Assert.IsInstanceOf(properties);
Assert.IsNull(properties.Data);
}
@@ -141,7 +143,7 @@
{
DesignWaterLevel = assessmentLevel
};
- var input = new WaveConditionsInput()
+ var input = new WaveConditionsInput
{
ForeshoreProfile = foreshoreProfile,
HydraulicBoundaryLocation = hydraulicBoundaryLocation,
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj
===================================================================
diff -u -raa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision aa56a5d7a6ec9f083ce3bd7a65d0c5b06470fd3b)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -60,8 +60,6 @@
-
-
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextForeshoreProfileEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/UITypeEditors/WaveConditionsInputContextHydraulicBoundaryLocationEditorTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs
===================================================================
diff -u -rd3ee3323c871a2796496b0f2ab1fe65ead8ad81d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs (.../StabilityPointStructuresCalculationContext.cs) (revision d3ee3323c871a2796496b0f2ab1fe65ead8ad81d)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs (.../StabilityPointStructuresCalculationContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -30,10 +30,8 @@
/// Presentation object for all data required to configure an instance of
/// in order to prepare it for performing a calculation.
///
- public class StabilityPointStructuresCalculationContext : StabilityPointStructuresContextBase,
- ICalculationContext<
- StabilityPointStructuresCalculation,
- StabilityPointStructuresFailureMechanism>
+ public class StabilityPointStructuresCalculationContext : StructuresContextBase,
+ ICalculationContext
{
///
/// Creates a new instance of .
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationGroupContext.cs
===================================================================
diff -u -rd3ee3323c871a2796496b0f2ab1fe65ead8ad81d -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationGroupContext.cs (.../StabilityPointStructuresCalculationGroupContext.cs) (revision d3ee3323c871a2796496b0f2ab1fe65ead8ad81d)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationGroupContext.cs (.../StabilityPointStructuresCalculationGroupContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -31,10 +31,8 @@
/// Presentation object for all data required to configure an instance of
/// in order be able to create configurable stability point structures calculations.
///
- public class StabilityPointStructuresCalculationGroupContext : StabilityPointStructuresContextBase,
- ICalculationContext<
- CalculationGroup,
- StabilityPointStructuresFailureMechanism>
+ public class StabilityPointStructuresCalculationGroupContext : StructuresContextBase,
+ ICalculationContext
{
///
/// Creates a new instance of .
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContextBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs
===================================================================
diff -u -r7a0eb8b2709b5c13d4711701213826b9cbd5aafe -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs (.../StabilityPointStructuresInputContext.cs) (revision 7a0eb8b2709b5c13d4711701213826b9cbd5aafe)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs (.../StabilityPointStructuresInputContext.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -21,6 +21,7 @@
using System;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.StabilityPointStructures.Data;
namespace Ringtoets.StabilityPointStructures.Forms.PresentationObjects
@@ -29,7 +30,7 @@
/// Presentation object for all data required to configure an instance of
/// in order to be able to configure stability point structures calculations.
///
- public class StabilityPointStructuresInputContext : StabilityPointStructuresContextBase
+ public class StabilityPointStructuresInputContext : StructuresContextBase
{
///
/// Creates a new instance of .
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj
===================================================================
diff -u -r81e4be22ff8e2ea37c432625f91e986c95554297 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision 81e4be22ff8e2ea37c432625f91e986c95554297)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -43,7 +43,6 @@
-
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs
===================================================================
diff -u -r7a0eb8b2709b5c13d4711701213826b9cbd5aafe -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs (.../StabilityPointStructuresCalculationContextTest.cs) (revision 7a0eb8b2709b5c13d4711701213826b9cbd5aafe)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs (.../StabilityPointStructuresCalculationContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -46,7 +46,7 @@
var context = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.IsInstanceOf>(context);
Assert.AreSame(calculation, context.WrappedData);
Assert.AreSame(failureMechanism, context.FailureMechanism);
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationGroupContextTest.cs
===================================================================
diff -u -r7a0eb8b2709b5c13d4711701213826b9cbd5aafe -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationGroupContextTest.cs (.../StabilityPointStructuresCalculationGroupContextTest.cs) (revision 7a0eb8b2709b5c13d4711701213826b9cbd5aafe)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationGroupContextTest.cs (.../StabilityPointStructuresCalculationGroupContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -47,7 +47,7 @@
var groupContext = new StabilityPointStructuresCalculationGroupContext(calculationGroup, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(groupContext);
+ Assert.IsInstanceOf>(groupContext);
Assert.IsInstanceOf>(groupContext);
Assert.AreSame(calculationGroup, groupContext.WrappedData);
Assert.AreSame(failureMechanism, groupContext.FailureMechanism);
Fisheye: Tag cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs
===================================================================
diff -u -r7a0eb8b2709b5c13d4711701213826b9cbd5aafe -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs (.../StabilityPointStructuresInputContextTest.cs) (revision 7a0eb8b2709b5c13d4711701213826b9cbd5aafe)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs (.../StabilityPointStructuresInputContextTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -23,6 +23,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.StabilityPointStructures.Data;
using Ringtoets.StabilityPointStructures.Forms.PresentationObjects;
@@ -53,7 +54,7 @@
var context = new StabilityPointStructuresInputContext(input, calculation, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.AreSame(input, context.WrappedData);
Assert.AreSame(calculation, context.Calculation);
Assert.AreSame(failureMechanism, context.FailureMechanism);
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj
===================================================================
diff -u -r81e4be22ff8e2ea37c432625f91e986c95554297 -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision 81e4be22ff8e2ea37c432625f91e986c95554297)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e)
@@ -64,7 +64,6 @@
-