Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PresentationObjects/ClosingStructuresOutputContext.cs
===================================================================
diff -u -r767fd4c880443be2882b7510b290bd690c938fdc -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PresentationObjects/ClosingStructuresOutputContext.cs (.../ClosingStructuresOutputContext.cs) (revision 767fd4c880443be2882b7510b290bd690c938fdc)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PresentationObjects/ClosingStructuresOutputContext.cs (.../ClosingStructuresOutputContext.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Riskeer.ClosingStructures.Data;
using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Structures;
using Riskeer.Common.Forms.PresentationObjects;
@@ -36,25 +35,10 @@
/// 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 ClosingStructuresOutputContext(IStructuresCalculation wrappedData,
- ClosingStructuresFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
- : base(wrappedData, assessmentSection)
- {
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
- FailureMechanism = failureMechanism;
- }
-
- ///
- /// Gets the failure mechanism.
- ///
- public ClosingStructuresFailureMechanism FailureMechanism { get; }
+ : base(wrappedData, assessmentSection) {}
}
}
\ No newline at end of file
Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs
===================================================================
diff -u -r3ca6cbc5391c8e82d5f26c1174947e92a0412f07 -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (.../ClosingStructuresOutputProperties.cs) (revision 3ca6cbc5391c8e82d5f26c1174947e92a0412f07)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (.../ClosingStructuresOutputProperties.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -34,7 +34,7 @@
/// Creates a new instance of .
///
/// The structures output to create the object properties for.
- /// Thrown when any parameter is null.
+ /// Thrown when is null.
public ClosingStructuresOutputProperties(StructuresOutput structuresOutput)
: base(structuresOutput) {}
}
Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs
===================================================================
diff -u -r3ca6cbc5391c8e82d5f26c1174947e92a0412f07 -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 3ca6cbc5391c8e82d5f26c1174947e92a0412f07)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -709,7 +709,7 @@
calculation,
context.FailureMechanism,
context.AssessmentSection),
- new ClosingStructuresOutputContext(calculation, context.FailureMechanism, context.AssessmentSection)
+ new ClosingStructuresOutputContext(calculation, context.AssessmentSection)
};
}
Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresOutputContextTest.cs
===================================================================
diff -u -r767fd4c880443be2882b7510b290bd690c938fdc -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresOutputContextTest.cs (.../ClosingStructuresOutputContextTest.cs) (revision 767fd4c880443be2882b7510b290bd690c938fdc)
+++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresOutputContextTest.cs (.../ClosingStructuresOutputContextTest.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -19,10 +19,8 @@
// 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.ClosingStructures.Data;
using Riskeer.ClosingStructures.Data.TestUtil;
using Riskeer.ClosingStructures.Forms.PresentationObjects;
using Riskeer.Common.Data.AssessmentSection;
@@ -42,36 +40,15 @@
mocks.ReplayAll();
var calculation = new TestClosingStructuresCalculationScenario();
- var failureMechanism = new ClosingStructuresFailureMechanism();
// Call
- var structuresOutputContext = new ClosingStructuresOutputContext(calculation, failureMechanism, assessmentSection);
+ var structuresOutputContext = new ClosingStructuresOutputContext(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 TestClosingStructuresCalculationScenario();
-
- // Call
- TestDelegate call = () => new ClosingStructuresOutputContext(calculation, null, assessmentSection);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
- mocks.VerifyAll();
- }
}
}
\ No newline at end of file
Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/PropertyInfos/ClosingStructuresOutputPropertyInfoTest.cs
===================================================================
diff -u -re3ec17425657e955aa2f1eba9cf380d280edd452 -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/PropertyInfos/ClosingStructuresOutputPropertyInfoTest.cs (.../ClosingStructuresOutputPropertyInfoTest.cs) (revision e3ec17425657e955aa2f1eba9cf380d280edd452)
+++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/PropertyInfos/ClosingStructuresOutputPropertyInfoTest.cs (.../ClosingStructuresOutputPropertyInfoTest.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -24,7 +24,6 @@
using Core.Gui.PropertyBag;
using NUnit.Framework;
using Rhino.Mocks;
-using Riskeer.ClosingStructures.Data;
using Riskeer.ClosingStructures.Data.TestUtil;
using Riskeer.ClosingStructures.Forms.PresentationObjects;
using Riskeer.ClosingStructures.Forms.PropertyClasses;
@@ -68,14 +67,13 @@
var assessmentSection = mocks.Stub();
mocks.ReplayAll();
- var failureMechanism = new ClosingStructuresFailureMechanism();
var calculation = new TestClosingStructuresCalculationScenario
{
Output = new StructuresOutput(0, null)
};
// Call
- IObjectProperties objectProperties = info.CreateInstance(new ClosingStructuresOutputContext(calculation, failureMechanism, assessmentSection));
+ IObjectProperties objectProperties = info.CreateInstance(new ClosingStructuresOutputContext(calculation, assessmentSection));
// Assert
Assert.IsInstanceOf(objectProperties);
Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs
===================================================================
diff -u -r689442b685cb022d042eb46d60a583897e5afb90 -r66ccbbc5acc24f5f5e1231a73c01c39e398278a0
--- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 689442b685cb022d042eb46d60a583897e5afb90)
+++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 66ccbbc5acc24f5f5e1231a73c01c39e398278a0)
@@ -144,7 +144,6 @@
var structuresOutputContext = children[2] as ClosingStructuresOutputContext;
Assert.IsNotNull(structuresOutputContext);
Assert.AreSame(calculationContext.WrappedData, structuresOutputContext.WrappedData);
- Assert.AreSame(calculationContext.FailureMechanism, structuresOutputContext.FailureMechanism);
Assert.AreSame(calculationContext.AssessmentSection, structuresOutputContext.AssessmentSection);
}
@@ -930,7 +929,7 @@
{
// Given
IMainWindow mainWindow = MainWindowTestHelper.CreateMainWindowStub(mocks);
-
+
var observer = mocks.StrictMock();
observer.Expect(o => o.UpdateObserver());