Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs =================================================================== diff -u -r86ac28697ad7b279055dde47c52d0d3b3952fac6 -r3ca6cbc5391c8e82d5f26c1174947e92a0412f07 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (.../ClosingStructuresOutputProperties.cs) (revision 86ac28697ad7b279055dde47c52d0d3b3952fac6) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresOutputProperties.cs (.../ClosingStructuresOutputProperties.cs) (revision 3ca6cbc5391c8e82d5f26c1174947e92a0412f07) @@ -20,8 +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.PropertyClasses; @@ -32,33 +30,12 @@ /// public class ClosingStructuresOutputProperties : StructuresOutputProperties { - private readonly ClosingStructuresFailureMechanism 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 ClosingStructuresOutputProperties(StructuresOutput structuresOutput, - ClosingStructuresFailureMechanism 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; - } + public ClosingStructuresOutputProperties(StructuresOutput structuresOutput) + : base(structuresOutput) {} } } \ No newline at end of file Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -rab898752550072651405ede02c5085df7800a602 -r3ca6cbc5391c8e82d5f26c1174947e92a0412f07 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision ab898752550072651405ede02c5085df7800a602) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 3ca6cbc5391c8e82d5f26c1174947e92a0412f07) @@ -90,9 +90,7 @@ }; yield return new PropertyInfo { - CreateInstance = context => new ClosingStructuresOutputProperties(context.WrappedData.Output, - context.FailureMechanism, - context.AssessmentSection) + CreateInstance = context => new ClosingStructuresOutputProperties(context.WrappedData.Output) }; } Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs =================================================================== diff -u -re3422ff344de83f9cc3331b5af2c453dd730c74d -r3ca6cbc5391c8e82d5f26c1174947e92a0412f07 --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs (.../ClosingStructuresOutputPropertiesTest.cs) (revision e3422ff344de83f9cc3331b5af2c453dd730c74d) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresOutputPropertiesTest.cs (.../ClosingStructuresOutputPropertiesTest.cs) (revision 3ca6cbc5391c8e82d5f26c1174947e92a0412f07) @@ -36,51 +36,17 @@ public class ClosingStructuresOutputPropertiesTest { [Test] - public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - // Call - TestDelegate call = () => new ClosingStructuresOutputProperties(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 ClosingStructuresOutputProperties(new TestStructuresOutput(), new ClosingStructuresFailureMechanism(), 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 ClosingStructuresFailureMechanism(); // Call - var properties = new ClosingStructuresOutputProperties(output, failureMechanism, assessmentSection); + var properties = new ClosingStructuresOutputProperties(output); // Assert Assert.IsInstanceOf(properties); Assert.AreSame(output, properties.Data); - mocks.VerifyAll(); } [Test] @@ -97,7 +63,7 @@ var structuresOutput = new TestStructuresOutput(random.NextDouble()); // Call - var properties = new ClosingStructuresOutputProperties(structuresOutput, failureMechanism, assessmentSection); + var properties = new ClosingStructuresOutputProperties(structuresOutput); // Assert ProbabilityAssessmentOutput expectedProbabilityAssessmentOutput = ClosingStructuresProbabilityAssessmentOutputFactory.Create(