Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresOutputContext.cs
===================================================================
diff -u -r35349144a21f4e3627505605840f286b21b2d004 -r65fa32b1acf95b7ac64bf78c7df5e1852ac809bf
--- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresOutputContext.cs (.../HeightStructuresOutputContext.cs) (revision 35349144a21f4e3627505605840f286b21b2d004)
+++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresOutputContext.cs (.../HeightStructuresOutputContext.cs) (revision 65fa32b1acf95b7ac64bf78c7df5e1852ac809bf)
@@ -23,7 +23,6 @@
using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Structures;
using Riskeer.Common.Forms.PresentationObjects;
-using Riskeer.HeightStructures.Data;
namespace Riskeer.HeightStructures.Forms.PresentationObjects
{
@@ -36,25 +35,9 @@
/// Creates a new instance of .
///
/// The structures calculation wrapped by the context object.
- /// The failure mechanism the calculation belongs to.
/// The assessment section the calculation belongs to.
/// Thrown when any parameter is null.
- public HeightStructuresOutputContext(IStructuresCalculation wrappedData,
- HeightStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
- : base(wrappedData, assessmentSection)
- {
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
- FailureMechanism = failureMechanism;
- }
-
- ///
- /// Gets the failure mechanism.
- ///
- public HeightStructuresFailureMechanism FailureMechanism { get; }
+ public HeightStructuresOutputContext(IStructuresCalculation wrappedData, IAssessmentSection assessmentSection)
+ : base(wrappedData, assessmentSection) {}
}
}
\ No newline at end of file
Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs
===================================================================
diff -u -r30265d6f789bfc2aae0afa668ade298a9f721e3b -r65fa32b1acf95b7ac64bf78c7df5e1852ac809bf
--- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 30265d6f789bfc2aae0afa668ade298a9f721e3b)
+++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 65fa32b1acf95b7ac64bf78c7df5e1852ac809bf)
@@ -719,7 +719,7 @@
calculation,
context.FailureMechanism,
context.AssessmentSection),
- new HeightStructuresOutputContext(calculation, context.FailureMechanism, context.AssessmentSection)
+ new HeightStructuresOutputContext(calculation, context.AssessmentSection)
};
}
Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs
===================================================================
diff -u -r35349144a21f4e3627505605840f286b21b2d004 -r65fa32b1acf95b7ac64bf78c7df5e1852ac809bf
--- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs (.../HeightStructuresOutputContextTest.cs) (revision 35349144a21f4e3627505605840f286b21b2d004)
+++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs (.../HeightStructuresOutputContextTest.cs) (revision 65fa32b1acf95b7ac64bf78c7df5e1852ac809bf)
@@ -19,12 +19,10 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
using NUnit.Framework;
using Rhino.Mocks;
using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Forms.PresentationObjects;
-using Riskeer.HeightStructures.Data;
using Riskeer.HeightStructures.Data.TestUtil;
using Riskeer.HeightStructures.Forms.PresentationObjects;
@@ -42,36 +40,15 @@
mocks.ReplayAll();
var calculation = new TestHeightStructuresCalculationScenario();
- var failureMechanism = new HeightStructuresFailureMechanism();
// Call
- var structuresOutputContext = new HeightStructuresOutputContext(calculation, failureMechanism, assessmentSection);
+ var structuresOutputContext = new HeightStructuresOutputContext(calculation, assessmentSection);
// Assert
Assert.IsInstanceOf(structuresOutputContext);
Assert.AreSame(calculation, structuresOutputContext.WrappedData);
- Assert.AreSame(failureMechanism, structuresOutputContext.FailureMechanism);
Assert.AreSame(assessmentSection, structuresOutputContext.AssessmentSection);
mocks.VerifyAll();
}
-
- [Test]
- public void Constructor_FailureMechanismNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
-
- var calculation = new TestHeightStructuresCalculationScenario();
-
- // Call
- TestDelegate call = () => new HeightStructuresOutputContext(calculation, null, assessmentSection);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
- mocks.VerifyAll();
- }
}
}
\ No newline at end of file
Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresOutputPropertyInfoTest.cs
===================================================================
diff -u -rf91358183173c45a1ff8e341df44bca6320a500e -r65fa32b1acf95b7ac64bf78c7df5e1852ac809bf
--- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresOutputPropertyInfoTest.cs (.../HeightStructuresOutputPropertyInfoTest.cs) (revision f91358183173c45a1ff8e341df44bca6320a500e)
+++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresOutputPropertyInfoTest.cs (.../HeightStructuresOutputPropertyInfoTest.cs) (revision 65fa32b1acf95b7ac64bf78c7df5e1852ac809bf)
@@ -26,7 +26,6 @@
using Rhino.Mocks;
using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Structures;
-using Riskeer.HeightStructures.Data;
using Riskeer.HeightStructures.Data.TestUtil;
using Riskeer.HeightStructures.Forms.PresentationObjects;
using Riskeer.HeightStructures.Forms.PropertyClasses;
@@ -68,14 +67,13 @@
var assessmentSection = mocks.Stub();
mocks.ReplayAll();
- var failureMechanism = new HeightStructuresFailureMechanism();
var calculation = new TestHeightStructuresCalculationScenario
{
Output = new StructuresOutput(0, null)
};
// Call
- IObjectProperties objectProperties = info.CreateInstance(new HeightStructuresOutputContext(calculation, failureMechanism, assessmentSection));
+ IObjectProperties objectProperties = info.CreateInstance(new HeightStructuresOutputContext(calculation, assessmentSection));
// Assert
Assert.IsInstanceOf(objectProperties);
Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs
===================================================================
diff -u -rb0899d90d287d9e53b52b7573a0c0fd66120fa16 -r65fa32b1acf95b7ac64bf78c7df5e1852ac809bf
--- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision b0899d90d287d9e53b52b7573a0c0fd66120fa16)
+++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 65fa32b1acf95b7ac64bf78c7df5e1852ac809bf)
@@ -143,7 +143,6 @@
var structuresOutputContext = children[2] as HeightStructuresOutputContext;
Assert.IsNotNull(structuresOutputContext);
Assert.AreSame(calculationContext.WrappedData, structuresOutputContext.WrappedData);
- Assert.AreSame(calculationContext.FailureMechanism, structuresOutputContext.FailureMechanism);
Assert.AreSame(calculationContext.AssessmentSection, structuresOutputContext.AssessmentSection);
}