Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs
===================================================================
diff -u -r86ac28697ad7b279055dde47c52d0d3b3952fac6 -r30265d6f789bfc2aae0afa668ade298a9f721e3b
--- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs (.../HeightStructuresOutputProperties.cs) (revision 86ac28697ad7b279055dde47c52d0d3b3952fac6)
+++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresOutputProperties.cs (.../HeightStructuresOutputProperties.cs) (revision 30265d6f789bfc2aae0afa668ade298a9f721e3b)
@@ -20,10 +20,8 @@
// All rights reserved.
using System;
-using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Structures;
using Riskeer.Common.Forms.PropertyClasses;
-using Riskeer.HeightStructures.Data;
namespace Riskeer.HeightStructures.Forms.PropertyClasses
{
@@ -32,33 +30,12 @@
///
public class HeightStructuresOutputProperties : StructuresOutputProperties
{
- private readonly HeightStructuresFailureMechanism failureMechanism;
- private readonly IAssessmentSection assessmentSection;
-
///
/// Creates a new instance of .
///
/// The structures output to create the object properties for.
- /// The failure mechanism the output belongs to.
- /// The assessment section the output belongs to.
- /// Thrown when any parameter is null.
- public HeightStructuresOutputProperties(StructuresOutput structuresOutput,
- HeightStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
- : base(structuresOutput)
- {
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
- if (assessmentSection == null)
- {
- throw new ArgumentNullException(nameof(assessmentSection));
- }
-
- this.failureMechanism = failureMechanism;
- this.assessmentSection = assessmentSection;
- }
+ /// Thrown when is null.
+ public HeightStructuresOutputProperties(StructuresOutput structuresOutput)
+ : base(structuresOutput) {}
}
}
\ No newline at end of file
Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs
===================================================================
diff -u -rfdef7e5b0412c76725a15c5d73a16d3915636da2 -r30265d6f789bfc2aae0afa668ade298a9f721e3b
--- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision fdef7e5b0412c76725a15c5d73a16d3915636da2)
+++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 30265d6f789bfc2aae0afa668ade298a9f721e3b)
@@ -91,9 +91,7 @@
};
yield return new PropertyInfo
{
- CreateInstance = context => new HeightStructuresOutputProperties(context.WrappedData.Output,
- context.FailureMechanism,
- context.AssessmentSection)
+ CreateInstance = context => new HeightStructuresOutputProperties(context.WrappedData.Output)
};
}
Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs
===================================================================
diff -u -re3422ff344de83f9cc3331b5af2c453dd730c74d -r30265d6f789bfc2aae0afa668ade298a9f721e3b
--- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs (.../HeightStructuresOutputPropertiesTest.cs) (revision e3422ff344de83f9cc3331b5af2c453dd730c74d)
+++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresOutputPropertiesTest.cs (.../HeightStructuresOutputPropertiesTest.cs) (revision 30265d6f789bfc2aae0afa668ade298a9f721e3b)
@@ -36,51 +36,17 @@
public class HeightStructuresOutputPropertiesTest
{
[Test]
- public void Constructor_FailureMechanismNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
-
- // Call
- TestDelegate call = () => new HeightStructuresOutputProperties(new TestStructuresOutput(), null, assessmentSection);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
- mocks.VerifyAll();
- }
-
- [Test]
- public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException()
- {
- // Call
- TestDelegate call = () => new HeightStructuresOutputProperties(new TestStructuresOutput(), new HeightStructuresFailureMechanism(), null);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("assessmentSection", exception.ParamName);
- }
-
- [Test]
public void Constructor_ExpectedValues()
{
// Setup
- var mocks = new MockRepository();
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
-
var output = new TestStructuresOutput();
- var failureMechanism = new HeightStructuresFailureMechanism();
// Call
- var properties = new HeightStructuresOutputProperties(output, failureMechanism, assessmentSection);
+ var properties = new HeightStructuresOutputProperties(output);
// Assert
Assert.IsInstanceOf(properties);
Assert.AreSame(output, properties.Data);
- mocks.VerifyAll();
}
[Test]
@@ -99,7 +65,7 @@
var structuresOutput = new TestStructuresOutput(reliability);
// Call
- var properties = new HeightStructuresOutputProperties(structuresOutput, failureMechanism, assessmentSection);
+ var properties = new HeightStructuresOutputProperties(structuresOutput);
// Assert
ProbabilityAssessmentOutput expectedProbabilityAssessmentOutput = HeightStructuresProbabilityAssessmentOutputFactory.Create(