Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs =================================================================== diff -u -rec259a1712d340ad2daebb66f1f82be1249fdc77 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision ec259a1712d340ad2daebb66f1f82be1249fdc77) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -89,7 +89,6 @@ using Riskeer.Integration.Plugin.Properties; using Riskeer.Integration.Service; using Riskeer.Integration.Service.Comparers; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; using Riskeer.StabilityStoneCover.Forms.PresentationObjects; using Riskeer.WaveImpactAsphaltCover.Forms.PresentationObjects; using ClosingStructuresCalculationsStateFailureMechanismContext = Riskeer.ClosingStructures.Forms.PresentationObjects.CalculationsState.ClosingStructuresFailureMechanismContext; @@ -108,6 +107,8 @@ using MacroStabilityInwardsRegistrationStateFailureMechanismContext = Riskeer.MacroStabilityInwards.Forms.PresentationObjects.RegistrationState.MacroStabilityInwardsFailureMechanismContext; using PipingCalculationsStateFailureMechanismContext = Riskeer.Piping.Forms.PresentationObjects.CalculationsState.PipingFailureMechanismContext; using PipingRegistrationStateFailureMechanismContext = Riskeer.Piping.Forms.PresentationObjects.RegistrationState.PipingFailureMechanismContext; +using StabilityPointStructuresCalculationsStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState.StabilityPointStructuresFailureMechanismContext; +using StabilityPointStructuresRegistrationStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState.StabilityPointStructuresFailureMechanismContext; using RiskeerCommonDataResources = Riskeer.Common.Data.Properties.Resources; using RiskeerCommonIOResources = Riskeer.Common.IO.Properties.Resources; using RiskeerCommonUtilResources = Riskeer.Common.Util.Properties.Resources; @@ -1785,7 +1786,7 @@ new MacroStabilityInwardsCalculationsStateFailureMechanismContext(assessmentSection.MacroStabilityInwards, assessmentSection), new HeightStructuresCalculationsStateFailureMechanismContext(assessmentSection.HeightStructures, assessmentSection), new ClosingStructuresCalculationsStateFailureMechanismContext(assessmentSection.ClosingStructures, assessmentSection), - new StabilityPointStructuresCalculationsContext(assessmentSection.StabilityPointStructures, assessmentSection) + new StabilityPointStructuresCalculationsStateFailureMechanismContext(assessmentSection.StabilityPointStructures, assessmentSection) }; } @@ -1870,7 +1871,7 @@ new HeightStructuresRegistrationStateFailureMechanismContext(assessmentSection.HeightStructures, assessmentSection), new ClosingStructuresRegistrationStateFailureMechanismContext(assessmentSection.ClosingStructures, assessmentSection), new PipingStructureFailurePathContext(assessmentSection.PipingStructure, assessmentSection), - new StabilityPointStructuresFailurePathContext(assessmentSection.StabilityPointStructures, assessmentSection), + new StabilityPointStructuresRegistrationStateFailureMechanismContext(assessmentSection.StabilityPointStructures, assessmentSection), new DuneErosionRegistrationStateFailureMechanismContext(assessmentSection.DuneErosion, assessmentSection) }; } Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/CalculationsStateRootContextTreeNodeInfoTest.cs =================================================================== diff -u -rec259a1712d340ad2daebb66f1f82be1249fdc77 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/CalculationsStateRootContextTreeNodeInfoTest.cs (.../CalculationsStateRootContextTreeNodeInfoTest.cs) (revision ec259a1712d340ad2daebb66f1f82be1249fdc77) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/CalculationsStateRootContextTreeNodeInfoTest.cs (.../CalculationsStateRootContextTreeNodeInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -39,7 +39,7 @@ using Riskeer.Integration.Forms.PresentationObjects; using Riskeer.MacroStabilityInwards.Forms.PresentationObjects.CalculationsState; using Riskeer.Piping.Forms.PresentationObjects.CalculationsState; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; using RiskeerIntegrationFormsResources = Riskeer.Integration.Forms.Properties.Resources; @@ -187,9 +187,9 @@ Assert.AreSame(assessmentSection.ClosingStructures, closingStructuresFailureMechanismContext.WrappedData); Assert.AreSame(assessmentSection, closingStructuresFailureMechanismContext.Parent); - var stabilityPointStructuresCalculationsContext = (StabilityPointStructuresCalculationsContext) objects[5]; - Assert.AreSame(assessmentSection.StabilityPointStructures, stabilityPointStructuresCalculationsContext.WrappedData); - Assert.AreSame(assessmentSection, stabilityPointStructuresCalculationsContext.Parent); + var stabilityPointStructuresFailureMechanismsContext = (StabilityPointStructuresFailureMechanismContext) objects[5]; + Assert.AreSame(assessmentSection.StabilityPointStructures, stabilityPointStructuresFailureMechanismsContext.WrappedData); + Assert.AreSame(assessmentSection, stabilityPointStructuresFailureMechanismsContext.Parent); } } Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/GenericFailureMechanismsContextTreeNodeInfoTest.cs =================================================================== diff -u -rec259a1712d340ad2daebb66f1f82be1249fdc77 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/GenericFailureMechanismsContextTreeNodeInfoTest.cs (.../GenericFailureMechanismsContextTreeNodeInfoTest.cs) (revision ec259a1712d340ad2daebb66f1f82be1249fdc77) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/GenericFailureMechanismsContextTreeNodeInfoTest.cs (.../GenericFailureMechanismsContextTreeNodeInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -39,7 +39,7 @@ using Riskeer.Integration.Forms.PresentationObjects.StandAlone; using Riskeer.MacroStabilityInwards.Forms.PresentationObjects.RegistrationState; using Riskeer.Piping.Forms.PresentationObjects.RegistrationState; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; using Riskeer.StabilityStoneCover.Forms.PresentationObjects; using Riskeer.WaveImpactAsphaltCover.Forms.PresentationObjects; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; @@ -228,9 +228,9 @@ Assert.AreSame(assessmentSection.PipingStructure, pipingStructureFailurePathContext.WrappedData); Assert.AreSame(assessmentSection, pipingStructureFailurePathContext.Parent); - var stabilityPointStructuresFailurePathContext = (StabilityPointStructuresFailurePathContext) objects[13]; - Assert.AreSame(assessmentSection.StabilityPointStructures, stabilityPointStructuresFailurePathContext.WrappedData); - Assert.AreSame(assessmentSection, stabilityPointStructuresFailurePathContext.Parent); + var stabilityPointStructuresFailureMechanismContext = (StabilityPointStructuresFailureMechanismContext) objects[13]; + Assert.AreSame(assessmentSection.StabilityPointStructures, stabilityPointStructuresFailureMechanismContext.WrappedData); + Assert.AreSame(assessmentSection, stabilityPointStructuresFailureMechanismContext.Parent); var duneErosionFailureMechanismContext = (DuneErosionFailureMechanismContext) objects[14]; Assert.AreSame(assessmentSection.DuneErosion, duneErosionFailureMechanismContext.WrappedData); Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContext.cs =================================================================== diff -u --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContext.cs (revision 0) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContext.cs (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -0,0 +1,45 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Data; + +namespace Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState +{ + /// + /// Presentation object for in the calculations state. + /// + public class StabilityPointStructuresFailureMechanismContext : FailureMechanismContext + { + /// + /// Creates a new instance of . + /// + /// The + /// instance wrapped by this context object. + /// The assessment section which the failure mechanism belongs to. + /// Thrown when any parameter is null. + public StabilityPointStructuresFailureMechanismContext(StabilityPointStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(failureMechanism, assessmentSection) {} + } +} \ No newline at end of file Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContext.cs =================================================================== diff -u --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContext.cs (revision 0) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContext.cs (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -0,0 +1,45 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Data; + +namespace Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState +{ + /// + /// Presentation object for in the registration state. + /// + public class StabilityPointStructuresFailureMechanismContext : FailureMechanismContext + { + /// + /// Creates a new instance of . + /// + /// The + /// instance wrapped by this context object. + /// The assessment section which the failure mechanism belongs to. + /// Thrown when any parameter is null. + public StabilityPointStructuresFailureMechanismContext(StabilityPointStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(failureMechanism, assessmentSection) {} + } +} \ No newline at end of file Fisheye: Tag 3718db599f50e4e68dda3fe51b2541c17b44367b refers to a dead (removed) revision in file `Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationsContext.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 3718db599f50e4e68dda3fe51b2541c17b44367b refers to a dead (removed) revision in file `Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresFailurePathContext.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r345aaa998981d0e439b8c296c76071f2ccdef824 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 345aaa998981d0e439b8c296c76071f2ccdef824) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -60,6 +60,8 @@ using Riskeer.StabilityPointStructures.IO.Configurations; using Riskeer.StabilityPointStructures.Plugin.FileImporters; using Riskeer.StabilityPointStructures.Service; +using CalculationStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState.StabilityPointStructuresFailureMechanismContext; +using RegistrationStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState.StabilityPointStructuresFailureMechanismContext; using CalculationsStateFailureMechanismProperties = Riskeer.StabilityPointStructures.Forms.PropertyClasses.CalculationsState.StabilityPointStructuresFailureMechanismProperties; using RegistrationStateFailureMechanismProperties = Riskeer.StabilityPointStructures.Forms.PropertyClasses.RegistrationState.StabilityPointStructuresFailureMechanismProperties; using CalculationsStateFailureMechanismView = Riskeer.StabilityPointStructures.Forms.Views.CalculationsState.StabilityPointStructuresFailureMechanismView; @@ -77,11 +79,11 @@ { public override IEnumerable GetPropertyInfos() { - yield return new PropertyInfo + yield return new PropertyInfo { CreateInstance = context => new CalculationsStateFailureMechanismProperties(context.WrappedData) }; - yield return new PropertyInfo + yield return new PropertyInfo { CreateInstance = context => new RegistrationStateFailureMechanismProperties(context.WrappedData) }; @@ -98,13 +100,13 @@ public override IEnumerable GetViewInfos() { - yield return new RiskeerViewInfo(() => Gui) + yield return new RiskeerViewInfo(() => Gui) { GetViewName = (view, context) => context.WrappedData.Name, CreateInstance = context => new CalculationsStateFailureMechanismView(context.WrappedData, context.Parent) }; - yield return new RiskeerViewInfo(() => Gui) + yield return new RiskeerViewInfo(() => Gui) { GetViewName = (view, context) => context.WrappedData.Name, AdditionalDataCheck = context => context.WrappedData.InAssembly, @@ -145,11 +147,11 @@ public override IEnumerable GetTreeNodeInfos() { - yield return RiskeerTreeNodeInfoFactory.CreateFailureMechanismStateContextTreeNodeInfo( + yield return RiskeerTreeNodeInfoFactory.CreateFailureMechanismStateContextTreeNodeInfo( CalculationsChildNodeObjects, CalculationsContextMenuStrip); - yield return RiskeerTreeNodeInfoFactory.CreateFailurePathContextTreeNodeInfo( + yield return RiskeerTreeNodeInfoFactory.CreateFailurePathContextTreeNodeInfo( FailurePathEnabledChildNodeObjects, FailurePathDisabledChildNodeObjects, FailurePathEnabledContextMenuStrip, @@ -350,7 +352,7 @@ .FirstOrDefault(); } - if (dataToCloseFor is StabilityPointStructuresCalculationsContext failureMechanismContext) + if (dataToCloseFor is CalculationStateFailureMechanismContext failureMechanismContext) { failureMechanism = failureMechanismContext.WrappedData; } @@ -364,7 +366,7 @@ #region StabilityPointStructuresCalculationsContext TreeNodeInfo - private static object[] CalculationsChildNodeObjects(StabilityPointStructuresCalculationsContext context) + private static object[] CalculationsChildNodeObjects(CalculationStateFailureMechanismContext context) { StabilityPointStructuresFailureMechanism failureMechanism = context.WrappedData; IAssessmentSection assessmentSection = context.Parent; @@ -389,7 +391,7 @@ }; } - private ContextMenuStrip CalculationsContextMenuStrip(StabilityPointStructuresCalculationsContext context, + private ContextMenuStrip CalculationsContextMenuStrip(CalculationStateFailureMechanismContext context, object parentData, TreeViewControl treeViewControl) { @@ -420,18 +422,18 @@ .Build(); } - private static string EnableValidateAndCalculateMenuItemForFailureMechanism(StabilityPointStructuresCalculationsContext context) + private static string EnableValidateAndCalculateMenuItemForFailureMechanism(CalculationStateFailureMechanismContext context) { return EnableValidateAndCalculateMenu(context.Parent); } - private static void ValidateAllInFailureMechanism(StabilityPointStructuresCalculationsContext context) + private static void ValidateAllInFailureMechanism(CalculationStateFailureMechanismContext context) { ValidateAll(context.WrappedData.Calculations.OfType>(), context.Parent); } - private void CalculateAllInFailureMechanism(StabilityPointStructuresCalculationsContext context) + private void CalculateAllInFailureMechanism(CalculationStateFailureMechanismContext context) { ActivityProgressDialogRunner.Run(Gui.MainWindow, StabilityPointStructuresCalculationActivityFactory.CreateCalculationActivities(context.WrappedData, context.Parent)); @@ -441,7 +443,7 @@ #region StabilityPointStructuresFailurePathContext TreeNodeInfo - private static object[] FailurePathEnabledChildNodeObjects(StabilityPointStructuresFailurePathContext context) + private static object[] FailurePathEnabledChildNodeObjects(RegistrationStateFailureMechanismContext context) { StabilityPointStructuresFailureMechanism failureMechanism = context.WrappedData; IAssessmentSection assessmentSection = context.Parent; @@ -455,7 +457,7 @@ }; } - private static object[] FailurePathDisabledChildNodeObjects(StabilityPointStructuresFailurePathContext context) + private static object[] FailurePathDisabledChildNodeObjects(RegistrationStateFailureMechanismContext context) { return new object[] { @@ -483,7 +485,7 @@ }; } - private ContextMenuStrip FailurePathEnabledContextMenuStrip(StabilityPointStructuresFailurePathContext context, + private ContextMenuStrip FailurePathEnabledContextMenuStrip(RegistrationStateFailureMechanismContext context, object parentData, TreeViewControl treeViewControl) { @@ -500,7 +502,7 @@ .Build(); } - private ContextMenuStrip FailurePathDisabledContextMenuStrip(StabilityPointStructuresFailurePathContext context, + private ContextMenuStrip FailurePathDisabledContextMenuStrip(RegistrationStateFailureMechanismContext context, object parentData, TreeViewControl treeViewControl) { @@ -515,7 +517,7 @@ .Build(); } - private void RemoveAllViewsForItem(StabilityPointStructuresFailurePathContext context) + private void RemoveAllViewsForItem(RegistrationStateFailureMechanismContext context) { Gui.ViewCommands.RemoveAllViewsForItem(context); } Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContextTest.cs =================================================================== diff -u --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContextTest.cs (revision 0) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/CalculationsState/StabilityPointStructuresFailureMechanismContextTest.cs (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -0,0 +1,54 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using NUnit.Framework; +using Rhino.Mocks; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Data; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; + +namespace Riskeer.StabilityPointStructures.Forms.Test.PresentationObjects.CalculationsState +{ + [TestFixture] + public class StabilityPointStructuresFailureMechanismContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + + // Call + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf>(context); + Assert.AreSame(assessmentSection, context.Parent); + Assert.AreSame(failureMechanism, context.WrappedData); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContextTest.cs =================================================================== diff -u --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContextTest.cs (revision 0) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/RegistrationState/StabilityPointStructuresFailureMechanismContextTest.cs (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -0,0 +1,54 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using NUnit.Framework; +using Rhino.Mocks; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Data; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; + +namespace Riskeer.StabilityPointStructures.Forms.Test.PresentationObjects.RegistrationState +{ + [TestFixture] + public class StabilityPointStructuresFailureMechanismContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + + // Call + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf>(context); + Assert.AreSame(assessmentSection, context.Parent); + Assert.AreSame(failureMechanism, context.WrappedData); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Fisheye: Tag 3718db599f50e4e68dda3fe51b2541c17b44367b refers to a dead (removed) revision in file `Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationsContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 3718db599f50e4e68dda3fe51b2541c17b44367b refers to a dead (removed) revision in file `Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresFailurePathContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/CalculationsState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs =================================================================== diff -u -ra526a626b2e73c79669ad22ceb6be464872ecf51 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/CalculationsState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs (.../StabilityPointStructuresFailureMechanismPropertyInfoTest.cs) (revision a526a626b2e73c79669ad22ceb6be464872ecf51) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/CalculationsState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs (.../StabilityPointStructuresFailureMechanismPropertyInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -26,7 +26,7 @@ using Rhino.Mocks; using Riskeer.Common.Data.AssessmentSection; using Riskeer.StabilityPointStructures.Data; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; using Riskeer.StabilityPointStructures.Forms.PropertyClasses.CalculationsState; namespace Riskeer.StabilityPointStructures.Plugin.Test.PropertyInfos.CalculationsState @@ -54,7 +54,7 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(StabilityPointStructuresCalculationsContext), info.DataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.DataType); Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismProperties), info.PropertyObjectType); } @@ -67,7 +67,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call IObjectProperties objectProperties = info.CreateInstance(context); Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/RegistrationState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs =================================================================== diff -u -ra526a626b2e73c79669ad22ceb6be464872ecf51 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/RegistrationState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs (.../StabilityPointStructuresFailureMechanismPropertyInfoTest.cs) (revision a526a626b2e73c79669ad22ceb6be464872ecf51) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/PropertyInfos/RegistrationState/StabilityPointStructuresFailureMechanismPropertyInfoTest.cs (.../StabilityPointStructuresFailureMechanismPropertyInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -26,7 +26,7 @@ using Rhino.Mocks; using Riskeer.Common.Data.AssessmentSection; using Riskeer.StabilityPointStructures.Data; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; using Riskeer.StabilityPointStructures.Forms.PropertyClasses.RegistrationState; namespace Riskeer.StabilityPointStructures.Plugin.Test.PropertyInfos.RegistrationState @@ -54,7 +54,7 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(StabilityPointStructuresFailurePathContext), info.DataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.DataType); Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismProperties), info.PropertyObjectType); } @@ -67,7 +67,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call IObjectProperties objectProperties = info.CreateInstance(context); Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs =================================================================== diff -u -r345aaa998981d0e439b8c296c76071f2ccdef824 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs (.../StabilityPointStructuresPluginTest.cs) (revision 345aaa998981d0e439b8c296c76071f2ccdef824) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/StabilityPointStructuresPluginTest.cs (.../StabilityPointStructuresPluginTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -38,6 +38,8 @@ using Riskeer.StabilityPointStructures.Forms.PresentationObjects; using Riskeer.StabilityPointStructures.Forms.PropertyClasses; using Riskeer.StabilityPointStructures.Forms.Views; +using CalculationStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState.StabilityPointStructuresFailureMechanismContext; +using RegistrationStateFailureMechanismContext = Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState.StabilityPointStructuresFailureMechanismContext; using CalculationsStateFailureMechanismProperties = Riskeer.StabilityPointStructures.Forms.PropertyClasses.CalculationsState.StabilityPointStructuresFailureMechanismProperties; using RegistrationStateFailureMechanismProperties = Riskeer.StabilityPointStructures.Forms.PropertyClasses.RegistrationState.StabilityPointStructuresFailureMechanismProperties; using CalculationsStateFailureMechanismView = Riskeer.StabilityPointStructures.Forms.Views.CalculationsState.StabilityPointStructuresFailureMechanismView; @@ -73,12 +75,12 @@ PluginTestHelper.AssertPropertyInfoDefined( propertyInfos, - typeof(StabilityPointStructuresCalculationsContext), + typeof(CalculationStateFailureMechanismContext), typeof(CalculationsStateFailureMechanismProperties)); PluginTestHelper.AssertPropertyInfoDefined( propertyInfos, - typeof(StabilityPointStructuresFailurePathContext), + typeof(RegistrationStateFailureMechanismProperties), typeof(RegistrationStateFailureMechanismProperties)); PluginTestHelper.AssertPropertyInfoDefined( @@ -109,8 +111,8 @@ // Assert Assert.AreEqual(9, treeNodeInfos.Length); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StabilityPointStructuresCalculationsContext))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StabilityPointStructuresFailurePathContext))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(CalculationStateFailureMechanismContext))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(RegistrationStateFailureMechanismContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StabilityPointStructuresFailureMechanismSectionResultContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StabilityPointStructuresContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StabilityPointStructure))); @@ -146,12 +148,12 @@ PluginTestHelper.AssertViewInfoDefined( viewInfos, - typeof(StabilityPointStructuresCalculationsContext), + typeof(CalculationStateFailureMechanismContext), typeof(CalculationsStateFailureMechanismView)); PluginTestHelper.AssertViewInfoDefined( viewInfos, - typeof(StabilityPointStructuresFailurePathContext), + typeof(RegistrationStateFailureMechanismContext), typeof(RegistrationStateFailureMechanismView)); PluginTestHelper.AssertViewInfoDefined( Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationsContextTreeNodeInfoTest.cs =================================================================== diff -u -r5e8b21352cfe76480799a139f21d2ef3c1b58ec7 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationsContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationsContextTreeNodeInfoTest.cs) (revision 5e8b21352cfe76480799a139f21d2ef3c1b58ec7) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationsContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationsContextTreeNodeInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -50,6 +50,7 @@ using Riskeer.StabilityPointStructures.Data; using Riskeer.StabilityPointStructures.Data.TestUtil; using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; namespace Riskeer.StabilityPointStructures.Plugin.Test.TreeNodeInfos @@ -104,7 +105,7 @@ mocksRepository.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var plugin = new StabilityPointStructuresPlugin()) { @@ -140,7 +141,7 @@ // Setup var assessmentSection = new AssessmentSectionStub(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var plugin = new StabilityPointStructuresPlugin()) { @@ -185,7 +186,7 @@ // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); var assessmentSection = mocksRepository.Stub(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = mocksRepository.StrictMock(); using (mocksRepository.Ordered()) @@ -233,7 +234,7 @@ { var assessmentSection = mocksRepository.Stub(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var gui = mocksRepository.Stub(); @@ -290,7 +291,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocksRepository); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var plugin = new StabilityPointStructuresPlugin()) @@ -332,7 +333,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var plugin = new StabilityPointStructuresPlugin()) @@ -385,7 +386,7 @@ var assessmentSection = mocksRepository.Stub(); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var plugin = new StabilityPointStructuresPlugin()) @@ -457,7 +458,7 @@ assessmentSection.Stub(a => a.FailureMechanismContribution).Return(FailureMechanismContributionTestFactory.CreateFailureMechanismContribution()); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var plugin = new StabilityPointStructuresPlugin()) using (var treeViewControl = new TreeViewControl()) @@ -557,7 +558,7 @@ var assessmentSection = mocksRepository.Stub(); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var plugin = new StabilityPointStructuresPlugin()) using (var treeViewControl = new TreeViewControl()) @@ -620,7 +621,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var plugin = new StabilityPointStructuresPlugin()) @@ -669,7 +670,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var plugin = new StabilityPointStructuresPlugin()) @@ -727,7 +728,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var messageBoxText = ""; @@ -800,7 +801,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); - var nodeData = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var messageBoxText = ""; @@ -844,7 +845,7 @@ private static TreeNodeInfo GetInfo(StabilityPointStructuresPlugin plugin) { - return plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StabilityPointStructuresCalculationsContext)); + return plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StabilityPointStructuresFailureMechanismContext)); } } } \ No newline at end of file Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailurePathContextTreeNodeInfoTest.cs =================================================================== diff -u -r3f3f5204cccd8a8dd012ce57595b298a23fa4ab7 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailurePathContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailurePathContextTreeNodeInfoTest.cs) (revision 3f3f5204cccd8a8dd012ce57595b298a23fa4ab7) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailurePathContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailurePathContextTreeNodeInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -34,6 +34,7 @@ using Riskeer.Common.Plugin.TestUtil; using Riskeer.StabilityPointStructures.Data; using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; namespace Riskeer.StabilityPointStructures.Plugin.Test.TreeNodeInfos @@ -48,7 +49,7 @@ public void Setup() { plugin = new StabilityPointStructuresPlugin(); - info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StabilityPointStructuresFailurePathContext)); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StabilityPointStructuresFailureMechanismContext)); } [TearDown] @@ -89,7 +90,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var context = new StabilityPointStructuresFailurePathContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); // Call string text = info.Text(context); @@ -115,7 +116,7 @@ // Setup var assessmentSection = new AssessmentSectionStub(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call object[] children = info.ChildNodeObjects(context).ToArray(); @@ -165,7 +166,7 @@ { InAssembly = false }; - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call object[] children = info.ChildNodeObjects(context).ToArray(); @@ -189,7 +190,7 @@ using (var treeViewControl = new TreeViewControl()) { var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); using (mocks.Ordered()) @@ -232,7 +233,7 @@ { InAssembly = false }; - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); using (mocks.Ordered()) @@ -262,14 +263,14 @@ [TestFixture] public class StabilityPointStructuresFailurePathContextInAssemblyTreeNodeInfoTest : - FailurePathInAssemblyTreeNodeInfoTestFixtureBase + FailurePathInAssemblyTreeNodeInfoTestFixtureBase { public StabilityPointStructuresFailurePathContextInAssemblyTreeNodeInfoTest() : base(2, 0) {} - protected override StabilityPointStructuresFailurePathContext CreateFailureMechanismContext(StabilityPointStructuresFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + protected override StabilityPointStructuresFailureMechanismContext CreateFailureMechanismContext(StabilityPointStructuresFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) { - return new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + return new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); } } } Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/CalculationsState/StabilityPointStructuresFailureMechanismViewInfoTest.cs =================================================================== diff -u -r345aaa998981d0e439b8c296c76071f2ccdef824 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/CalculationsState/StabilityPointStructuresFailureMechanismViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismViewInfoTest.cs) (revision 345aaa998981d0e439b8c296c76071f2ccdef824) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/CalculationsState/StabilityPointStructuresFailureMechanismViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismViewInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -26,7 +26,7 @@ using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.TestUtil; using Riskeer.StabilityPointStructures.Data; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; using Riskeer.StabilityPointStructures.Forms.Views.CalculationsState; namespace Riskeer.StabilityPointStructures.Plugin.Test.ViewInfos.CalculationsState @@ -56,8 +56,8 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(StabilityPointStructuresCalculationsContext), info.DataType); - Assert.AreEqual(typeof(StabilityPointStructuresCalculationsContext), info.ViewDataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.DataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.ViewDataType); } [Test] @@ -68,7 +68,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call string viewName = info.GetViewName(null, context); @@ -84,7 +84,7 @@ var assessmentSection = new AssessmentSectionStub(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call var view = (StabilityPointStructuresFailureMechanismView) info.CreateInstance(context); Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/RegistrationState/StabilityPointStructuresFailureMechanismViewInfoTest.cs =================================================================== diff -u -r345aaa998981d0e439b8c296c76071f2ccdef824 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/RegistrationState/StabilityPointStructuresFailureMechanismViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismViewInfoTest.cs) (revision 345aaa998981d0e439b8c296c76071f2ccdef824) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/RegistrationState/StabilityPointStructuresFailureMechanismViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismViewInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -26,7 +26,7 @@ using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.TestUtil; using Riskeer.StabilityPointStructures.Data; -using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; using Riskeer.StabilityPointStructures.Forms.Views.RegistrationState; namespace Riskeer.StabilityPointStructures.Plugin.Test.ViewInfos.RegistrationState @@ -56,8 +56,8 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(StabilityPointStructuresFailurePathContext), info.DataType); - Assert.AreEqual(typeof(StabilityPointStructuresFailurePathContext), info.ViewDataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.DataType); + Assert.AreEqual(typeof(StabilityPointStructuresFailureMechanismContext), info.ViewDataType); } [Test] @@ -68,7 +68,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call string viewName = info.GetViewName(null, context); @@ -91,7 +91,7 @@ InAssembly = inAssembly }; - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call bool result = info.AdditionalDataCheck(context); @@ -178,7 +178,7 @@ var assessmentSection = new AssessmentSectionStub(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call var view = (StabilityPointStructuresFailureMechanismView) info.CreateInstance(context); Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresCalculationsViewInfoTest.cs =================================================================== diff -u -rc5219e29c90757003a649a2b39d0e18fcbad1782 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresCalculationsViewInfoTest.cs (.../StabilityPointStructuresCalculationsViewInfoTest.cs) (revision c5219e29c90757003a649a2b39d0e18fcbad1782) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresCalculationsViewInfoTest.cs (.../StabilityPointStructuresCalculationsViewInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -30,6 +30,7 @@ using Riskeer.Common.Data.TestUtil; using Riskeer.StabilityPointStructures.Data; using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.CalculationsState; using Riskeer.StabilityPointStructures.Forms.Views; namespace Riskeer.StabilityPointStructures.Plugin.Test.ViewInfos @@ -198,7 +199,7 @@ using (var view = new StabilityPointStructuresCalculationsView(failureMechanism.CalculationsGroup, failureMechanism, assessmentSection)) { - var context = new StabilityPointStructuresCalculationsContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); // Call bool closeForData = info.CloseForData(view, context); @@ -217,7 +218,7 @@ using (var view = new StabilityPointStructuresCalculationsView(failureMechanism.CalculationsGroup, failureMechanism, assessmentSection)) { - var context = new StabilityPointStructuresCalculationsContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); // Call bool closeForData = info.CloseForData(view, context); Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresFailureMechanismResultViewInfoTest.cs =================================================================== diff -u -rc5219e29c90757003a649a2b39d0e18fcbad1782 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresFailureMechanismResultViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismResultViewInfoTest.cs) (revision c5219e29c90757003a649a2b39d0e18fcbad1782) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresFailureMechanismResultViewInfoTest.cs (.../StabilityPointStructuresFailureMechanismResultViewInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -31,6 +31,7 @@ using Riskeer.Common.Forms.Views; using Riskeer.StabilityPointStructures.Data; using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; namespace Riskeer.StabilityPointStructures.Plugin.Test.ViewInfos { @@ -226,7 +227,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var view = new StructuresFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, (fm, ass) => double.NaN)) @@ -250,7 +251,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); using (var view = new StructuresFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, (fm, ass) => double.NaN)) Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs =================================================================== diff -u -rc5219e29c90757003a649a2b39d0e18fcbad1782 -r3718db599f50e4e68dda3fe51b2541c17b44367b --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs (.../StabilityPointStructuresScenariosViewInfoTest.cs) (revision c5219e29c90757003a649a2b39d0e18fcbad1782) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/ViewInfos/StabilityPointStructuresScenariosViewInfoTest.cs (.../StabilityPointStructuresScenariosViewInfoTest.cs) (revision 3718db599f50e4e68dda3fe51b2541c17b44367b) @@ -29,6 +29,7 @@ using Riskeer.Common.Data.FailureMechanism; using Riskeer.StabilityPointStructures.Data; using Riskeer.StabilityPointStructures.Forms.PresentationObjects; +using Riskeer.StabilityPointStructures.Forms.PresentationObjects.RegistrationState; using Riskeer.StabilityPointStructures.Forms.Views; namespace Riskeer.StabilityPointStructures.Plugin.Test.ViewInfos @@ -202,7 +203,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(new StabilityPointStructuresFailureMechanism(), assessmentSection); using (var view = new StabilityPointStructuresScenariosView(failureMechanism.CalculationsGroup, failureMechanism)) { @@ -225,7 +226,7 @@ mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var context = new StabilityPointStructuresFailurePathContext(failureMechanism, assessmentSection); + var context = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection); using (var view = new StabilityPointStructuresScenariosView(failureMechanism.CalculationsGroup, failureMechanism)) {