Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -rd19a8549965b16b63086270a6e4eb0f8800af766 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision d19a8549965b16b63086270a6e4eb0f8800af766) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -705,7 +705,7 @@ calculation, context.FailureMechanism, context.AssessmentSection), - new StructuresOutputContext(calculation, context.AssessmentSection) + new StructuresOutputContext(calculation) }; } Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -rd19a8549965b16b63086270a6e4eb0f8800af766 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision d19a8549965b16b63086270a6e4eb0f8800af766) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -145,7 +145,6 @@ var structuresOutputContext = children[2] as StructuresOutputContext; Assert.IsNotNull(structuresOutputContext); Assert.AreSame(calculationContext.WrappedData, structuresOutputContext.WrappedData); - Assert.AreSame(calculationContext.AssessmentSection, structuresOutputContext.AssessmentSection); } [Test] Index: Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/StructuresOutputContext.cs =================================================================== diff -u -rd19a8549965b16b63086270a6e4eb0f8800af766 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/StructuresOutputContext.cs (.../StructuresOutputContext.cs) (revision d19a8549965b16b63086270a6e4eb0f8800af766) +++ Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/StructuresOutputContext.cs (.../StructuresOutputContext.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -21,7 +21,6 @@ using System; using Core.Common.Controls.PresentationObjects; -using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Structures; namespace Riskeer.Common.Forms.PresentationObjects @@ -35,22 +34,8 @@ /// Creates a new instance of . /// /// The structures calculation wrapped by the context object. - /// The assessment section the calculation belongs to. - /// Thrown when any parameter is null. - public StructuresOutputContext(IStructuresCalculation wrappedData, IAssessmentSection assessmentSection) - : base(wrappedData) - { - if (assessmentSection == null) - { - throw new ArgumentNullException(nameof(assessmentSection)); - } - - AssessmentSection = assessmentSection; - } - - /// - /// Gets the assessment section. - /// - public IAssessmentSection AssessmentSection { get; } + /// Thrown when is null. + public StructuresOutputContext(IStructuresCalculation wrappedData) + : base(wrappedData) {} } } \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/StructuresOutputContextTest.cs =================================================================== diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/StructuresOutputContextTest.cs (.../StructuresOutputContextTest.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/StructuresOutputContextTest.cs (.../StructuresOutputContextTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -23,7 +23,6 @@ using Core.Common.Controls.PresentationObjects; using NUnit.Framework; using Rhino.Mocks; -using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Structures; using Riskeer.Common.Forms.PresentationObjects; @@ -38,16 +37,14 @@ // Setup var mocks = new MockRepository(); var structuresCalculation = mocks.Stub(); - var assessmentSection = mocks.Stub(); mocks.ReplayAll(); // Call - var structuresOutputContext = new SimpleStructuresOutputContext(structuresCalculation, assessmentSection); + var structuresOutputContext = new SimpleStructuresOutputContext(structuresCalculation); // Assert Assert.IsInstanceOf>(structuresOutputContext); Assert.AreSame(structuresCalculation, structuresOutputContext.WrappedData); - Assert.AreSame(assessmentSection, structuresOutputContext.AssessmentSection); mocks.VerifyAll(); } @@ -60,18 +57,18 @@ mocks.ReplayAll(); // Call - TestDelegate call = () => new SimpleStructuresOutputContext(structuresCalculation, null); + void Call() => new SimpleStructuresOutputContext(structuresCalculation); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("assessmentSection", exception.ParamName); mocks.VerifyAll(); } private class SimpleStructuresOutputContext : StructuresOutputContext { - public SimpleStructuresOutputContext(IStructuresCalculation wrappedData, IAssessmentSection assessmentSection) - : base(wrappedData, assessmentSection) {} + public SimpleStructuresOutputContext(IStructuresCalculation wrappedData) + : base(wrappedData) {} } } } \ No newline at end of file Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r2fa986a816b48101a52c659c1ae89c3d9d7c5511 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 2fa986a816b48101a52c659c1ae89c3d9d7c5511) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -714,7 +714,7 @@ calculation, context.FailureMechanism, context.AssessmentSection), - new StructuresOutputContext(calculation, context.AssessmentSection) + new StructuresOutputContext(calculation) }; } Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2fa986a816b48101a52c659c1ae89c3d9d7c5511 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2fa986a816b48101a52c659c1ae89c3d9d7c5511) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -144,7 +144,6 @@ var structuresOutputContext = children[2] as StructuresOutputContext; Assert.IsNotNull(structuresOutputContext); Assert.AreSame(calculationContext.WrappedData, structuresOutputContext.WrappedData); - Assert.AreSame(calculationContext.AssessmentSection, structuresOutputContext.AssessmentSection); } [Test] Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs =================================================================== diff -u -rbdf765fcf0582551e2354de99db6dfcd49e4a43f -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs (.../StructuresOutputContextPropertyInfoTest.cs) (revision bdf765fcf0582551e2354de99db6dfcd49e4a43f) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs (.../StructuresOutputContextPropertyInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -23,8 +23,6 @@ using Core.Gui.Plugin; using Core.Gui.PropertyBag; using NUnit.Framework; -using Rhino.Mocks; -using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Structures; using Riskeer.Common.Data.TestUtil; using Riskeer.Common.Forms.PresentationObjects; @@ -63,23 +61,17 @@ public void CreateInstance_StructuresOutputContext_ReturnStructuresOutputProperties() { // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - var calculation = new TestStructuresCalculationScenario { Output = new StructuresOutput(0, null) }; // Call - IObjectProperties objectProperties = info.CreateInstance(new StructuresOutputContext(calculation, assessmentSection)); + IObjectProperties objectProperties = info.CreateInstance(new StructuresOutputContext(calculation)); // Assert Assert.IsInstanceOf>(objectProperties); Assert.AreSame(calculation.Output, objectProperties.Data); - - mocks.VerifyAll(); } } } \ No newline at end of file Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/StructuresOutputContextTreeNodeInfoTest.cs =================================================================== diff -u -r48244f68eee25ef1d91701d82e4c4867f0252ffc -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/StructuresOutputContextTreeNodeInfoTest.cs (.../StructuresOutputContextTreeNodeInfoTest.cs) (revision 48244f68eee25ef1d91701d82e4c4867f0252ffc) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/StructuresOutputContextTreeNodeInfoTest.cs (.../StructuresOutputContextTreeNodeInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -27,7 +27,6 @@ using Core.Gui.ContextMenu; using NUnit.Framework; using Rhino.Mocks; -using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Structures; using Riskeer.Common.Forms.PresentationObjects; using Riskeer.Common.Forms.Properties; @@ -100,12 +99,11 @@ public void ForeColor_HasNoOutput_ReturnGrayText() { // Setup - var assessmentSection = mocksRepository.Stub(); var structuresCalculation = mocksRepository.Stub(); mocksRepository.ReplayAll(); // Call - Color color = info.ForeColor(new SimpleStructuresOutputContext(structuresCalculation, assessmentSection)); + Color color = info.ForeColor(new SimpleStructuresOutputContext(structuresCalculation)); // Assert Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), color); @@ -115,13 +113,12 @@ public void ForeColor_HasOutput_ReturnControlText() { // Setup - var assessmentSection = mocksRepository.Stub(); var structuresCalculation = mocksRepository.Stub(); structuresCalculation.Stub(c => c.HasOutput).Return(true); mocksRepository.ReplayAll(); // Call - Color color = info.ForeColor(new SimpleStructuresOutputContext(structuresCalculation, assessmentSection)); + Color color = info.ForeColor(new SimpleStructuresOutputContext(structuresCalculation)); // Assert Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), color); @@ -173,8 +170,8 @@ private class SimpleStructuresOutputContext : StructuresOutputContext { - public SimpleStructuresOutputContext(IStructuresCalculation wrappedData, IAssessmentSection assessmentSection) - : base(wrappedData, assessmentSection) {} + public SimpleStructuresOutputContext(IStructuresCalculation wrappedData) + : base(wrappedData) {} } } } \ No newline at end of file Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs =================================================================== diff -u -rc31624c97c0497973430f779ab1d82c46696a2a1 -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision c31624c97c0497973430f779ab1d82c46696a2a1) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -89,12 +89,11 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); var structuresCalculation = mocks.Stub(); mocks.ReplayAll(); // Call - object viewData = info.GetViewData(new SimpleStructuresOutputContext(structuresCalculation, assessmentSection)); + object viewData = info.GetViewData(new SimpleStructuresOutputContext(structuresCalculation)); // Assert Assert.AreSame(structuresCalculation, viewData); @@ -107,12 +106,11 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); var structuresCalculation = mocks.Stub(); mocks.ReplayAll(); // Call - IView view = info.CreateInstance(new SimpleStructuresOutputContext(structuresCalculation, assessmentSection)); + IView view = info.CreateInstance(new SimpleStructuresOutputContext(structuresCalculation)); // Assert Assert.IsInstanceOf(view); @@ -121,8 +119,8 @@ private class SimpleStructuresOutputContext : StructuresOutputContext { - public SimpleStructuresOutputContext(IStructuresCalculation wrappedData, IAssessmentSection assessmentSection) - : base(wrappedData, assessmentSection) {} + public SimpleStructuresOutputContext(IStructuresCalculation wrappedData) + : base(wrappedData) {} } public abstract class ShouldCloseGeneralResultFaultTreeIllustrationPointViewForStructuresTester : ShouldCloseViewWithCalculationDataTester Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -rbdf765fcf0582551e2354de99db6dfcd49e4a43f -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision bdf765fcf0582551e2354de99db6dfcd49e4a43f) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -708,7 +708,7 @@ calculation, context.FailureMechanism, context.AssessmentSection), - new StructuresOutputContext(calculation, context.AssessmentSection) + new StructuresOutputContext(calculation) }; } Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -rbdf765fcf0582551e2354de99db6dfcd49e4a43f -r1bc5f2299c66132f869d09d017327d80f4a9522c --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision bdf765fcf0582551e2354de99db6dfcd49e4a43f) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 1bc5f2299c66132f869d09d017327d80f4a9522c) @@ -143,7 +143,6 @@ var structuresOutputContext = children[2] as StructuresOutputContext; Assert.IsNotNull(structuresOutputContext); Assert.AreSame(calculationContext.WrappedData, structuresOutputContext.WrappedData); - Assert.AreSame(calculationContext.AssessmentSection, structuresOutputContext.AssessmentSection); } [Test]