Fisheye: Tag cae86e85207fdc7bbdd45179588f5d3c56bac58f refers to a dead (removed) revision in file `Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/MacroStabilityOutwardsAssemblyCategoriesContext.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cae86e85207fdc7bbdd45179588f5d3c56bac58f refers to a dead (removed) revision in file `Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/PipingStructureFailureMechanismSectionResultContext.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContext.cs
===================================================================
diff -u
--- Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContext.cs (revision 0)
+++ Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContext.cs (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -0,0 +1,58 @@
+// 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 System.Collections.Generic;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Common.Data.AssemblyTool;
+using Riskeer.Common.Data.AssessmentSection;
+using Riskeer.Common.Forms.PresentationObjects;
+using Riskeer.Integration.Data.StandAlone;
+
+namespace Riskeer.Integration.Forms.PresentationObjects.StandAlone
+{
+ ///
+ /// This class is a presentation object for failure mechanism category boundaries for a
+ /// instance.
+ ///
+ public class MacroStabilityOutwardsAssemblyCategoriesContext : FailureMechanismAssemblyCategoriesContextBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The to wrap.
+ /// The assessment section the belongs to.
+ /// The function to get the 'N' parameter used to factor in the 'length effect'.
+ /// Thrown when any input parameter is null.
+ public MacroStabilityOutwardsAssemblyCategoriesContext(MacroStabilityOutwardsFailureMechanism wrappedData,
+ IAssessmentSection assessmentSection,
+ Func getNFunc)
+ : base(wrappedData, assessmentSection, getNFunc)
+ {
+ GetFailureMechanismSectionAssemblyCategoriesFunc = () =>
+ AssemblyToolCategoriesFactory.CreateGeotechnicalFailureMechanismSectionAssemblyCategories(assessmentSection.FailureMechanismContribution.Norm,
+ wrappedData.Contribution,
+ getNFunc());
+ }
+
+ public override Func> GetFailureMechanismSectionAssemblyCategoriesFunc { get; }
+ }
+}
\ No newline at end of file
Index: Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContext.cs
===================================================================
diff -u
--- Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContext.cs (revision 0)
+++ Riskeer/Integration/src/Riskeer.Integration.Forms/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContext.cs (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -0,0 +1,50 @@
+// 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 Core.Common.Base;
+using Riskeer.Common.Data.AssessmentSection;
+using Riskeer.Common.Data.FailureMechanism;
+using Riskeer.Common.Forms.PresentationObjects;
+using Riskeer.Integration.Data.StandAlone;
+
+namespace Riskeer.Integration.Forms.PresentationObjects.StandAlone
+{
+ ///
+ /// This class is a presentation object for a collection of
+ /// for the .
+ ///
+ public class PipingStructureFailureMechanismSectionResultContext : ProbabilityFailureMechanismSectionResultContext
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The
+ /// of to wrap.
+ /// The
+ /// the belongs to.
+ /// The assessment section the section results belongs to.
+ /// Thrown when any parameter is null.
+ public PipingStructureFailureMechanismSectionResultContext(IObservableEnumerable wrappedSectionResults,
+ PipingStructureFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
+ : base(wrappedSectionResults, failureMechanism, assessmentSection) {}
+ }
+}
\ No newline at end of file
Fisheye: Tag cae86e85207fdc7bbdd45179588f5d3c56bac58f refers to a dead (removed) revision in file `Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/MacroStabilityOutwardsAssemblyCategoriesContextTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag cae86e85207fdc7bbdd45179588f5d3c56bac58f refers to a dead (removed) revision in file `Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/PipingStructureFailureMechanismSectionResultContextTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContextTest.cs
===================================================================
diff -u
--- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContextTest.cs (revision 0)
+++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/MacroStabilityOutwardsAssemblyCategoriesContextTest.cs (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -0,0 +1,81 @@
+// 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 System.Collections.Generic;
+using NUnit.Framework;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.KernelWrapper.Calculators;
+using Riskeer.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Riskeer.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
+using Riskeer.Common.Data.TestUtil;
+using Riskeer.Common.Forms.PresentationObjects;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
+
+namespace Riskeer.Integration.Forms.Test.PresentationObjects.StandAlone
+{
+ [TestFixture]
+ public class MacroStabilityOutwardsAssemblyCategoriesContextTest
+ {
+ private const double tolerance = 1e-5;
+
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ var random = new Random(21);
+ double n = random.NextDouble();
+
+ var failureMechanism = new MacroStabilityOutwardsFailureMechanism
+ {
+ Contribution = random.NextDouble()
+ };
+
+ var assessmentSection = new AssessmentSectionStub();
+
+ using (new AssemblyToolCalculatorFactoryConfigOld())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactoryOld) AssemblyToolCalculatorFactoryOld.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ // Call
+ var context = new MacroStabilityOutwardsAssemblyCategoriesContext(failureMechanism,
+ assessmentSection,
+ () => n);
+
+ // Assert
+ Assert.IsInstanceOf(context);
+ Assert.AreSame(failureMechanism, context.WrappedData);
+ Assert.AreSame(assessmentSection, context.AssessmentSection);
+
+ IEnumerable output = context.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ IEnumerable calculatorOutput = calculator.GeotechnicalFailureMechanismSectionCategoriesOutput;
+ Assert.AreSame(calculatorOutput, output);
+
+ double normativeNorm = assessmentSection.FailureMechanismContribution.Norm;
+ Assert.AreEqual(failureMechanism.Contribution / 100, calculator.FailureMechanismContribution, tolerance);
+ Assert.AreEqual(normativeNorm, calculator.NormativeNorm, tolerance);
+ Assert.AreEqual(n, calculator.FailureMechanismN);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContextTest.cs
===================================================================
diff -u
--- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContextTest.cs (revision 0)
+++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PresentationObjects/StandAlone/PipingStructureFailureMechanismSectionResultContextTest.cs (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -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.Data.FailureMechanism;
+using Riskeer.Common.Forms.PresentationObjects;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
+
+namespace Riskeer.Integration.Forms.Test.PresentationObjects.StandAlone
+{
+ [TestFixture]
+ public class PipingStructureFailureMechanismSectionResultContextTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new PipingStructureFailureMechanism();
+
+ // Call
+ var context = new PipingStructureFailureMechanismSectionResultContext(
+ failureMechanism.SectionResults, failureMechanism, assessmentSection);
+
+ // Assert
+ Assert.IsInstanceOf>(context);
+ mocks.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/MacroStabilityOutwardsAssemblyCategoriesContextPropertyInfoTest.cs
===================================================================
diff -u -r3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7 -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/MacroStabilityOutwardsAssemblyCategoriesContextPropertyInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesContextPropertyInfoTest.cs) (revision 3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/PropertyInfos/MacroStabilityOutwardsAssemblyCategoriesContextPropertyInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesContextPropertyInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -26,7 +26,7 @@
using Riskeer.AssemblyTool.KernelWrapper.TestUtil.Calculators;
using Riskeer.Common.Data.TestUtil;
using Riskeer.Integration.Data.StandAlone;
-using Riskeer.Integration.Forms.PresentationObjects;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using Riskeer.Integration.Forms.PropertyClasses;
using Riskeer.Integration.Forms.TestUtil;
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsAssemblyCategoriesContextTreeNodeInfoTest.cs
===================================================================
diff -u -r7acad0fffa8ab8be61368d034b41a5bf144c03a2 -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsAssemblyCategoriesContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesContextTreeNodeInfoTest.cs) (revision 7acad0fffa8ab8be61368d034b41a5bf144c03a2)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsAssemblyCategoriesContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesContextTreeNodeInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -30,7 +30,7 @@
using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Plugin.TestUtil;
using Riskeer.Integration.Data.StandAlone;
-using Riskeer.Integration.Forms.PresentationObjects;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
namespace Riskeer.Integration.Plugin.Test.TreeNodeInfos
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailurePathContextTreeNodeInfoTest.cs
===================================================================
diff -u -r3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7 -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailurePathContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsFailurePathContextTreeNodeInfoTest.cs) (revision 3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailurePathContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsFailurePathContextTreeNodeInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -39,7 +39,6 @@
using Riskeer.Integration.Data.StandAlone;
using Riskeer.Integration.Data.StandAlone.Input;
using Riskeer.Integration.Data.StandAlone.SectionResults;
-using Riskeer.Integration.Forms.PresentationObjects;
using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismSectionResultContextTreeNodeInfoTest.cs
===================================================================
diff -u -rf3100c3b45fd61f451a147c48df8e25affaaae4c -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../PipingStructureFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision f3100c3b45fd61f451a147c48df8e25affaaae4c)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../PipingStructureFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -28,7 +28,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Riskeer.Common.Plugin.TestUtil;
-using Riskeer.Integration.Forms.PresentationObjects;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
namespace Riskeer.Integration.Plugin.Test.TreeNodeInfos
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailurePathContextTreeNodeInfoTest.cs
===================================================================
diff -u -ra73589ae2d5ade2d5fe3e494267d7e4e295a34bc -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailurePathContextTreeNodeInfoTest.cs (.../PipingStructureFailurePathContextTreeNodeInfoTest.cs) (revision a73589ae2d5ade2d5fe3e494267d7e4e295a34bc)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailurePathContextTreeNodeInfoTest.cs (.../PipingStructureFailurePathContextTreeNodeInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -36,7 +36,6 @@
using Riskeer.Common.Forms.PresentationObjects;
using Riskeer.Common.Plugin.TestUtil;
using Riskeer.Integration.Data.StandAlone;
-using Riskeer.Integration.Forms.PresentationObjects;
using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/MacroStabilityOutwardsAssemblyCategoriesViewInfoTest.cs
===================================================================
diff -u -r3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7 -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/MacroStabilityOutwardsAssemblyCategoriesViewInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesViewInfoTest.cs) (revision 3a4cc52eb9f7524ca64d6c2ab3a90230db2149c7)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/MacroStabilityOutwardsAssemblyCategoriesViewInfoTest.cs (.../MacroStabilityOutwardsAssemblyCategoriesViewInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -30,7 +30,7 @@
using Riskeer.Common.Data.TestUtil;
using Riskeer.Common.Plugin.TestUtil;
using Riskeer.Integration.Data.StandAlone;
-using Riskeer.Integration.Forms.PresentationObjects;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
using Riskeer.Integration.Forms.Views;
namespace Riskeer.Integration.Plugin.Test.ViewInfos
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/PipingStructureResultViewInfoTest.cs
===================================================================
diff -u -ra34b58a283d4eb94f7ad1f75c440e622a8a4d2cd -rcae86e85207fdc7bbdd45179588f5d3c56bac58f
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/PipingStructureResultViewInfoTest.cs (.../PipingStructureResultViewInfoTest.cs) (revision a34b58a283d4eb94f7ad1f75c440e622a8a4d2cd)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/PipingStructureResultViewInfoTest.cs (.../PipingStructureResultViewInfoTest.cs) (revision cae86e85207fdc7bbdd45179588f5d3c56bac58f)
@@ -30,7 +30,7 @@
using Riskeer.Common.Forms.PresentationObjects;
using Riskeer.Common.Forms.Views;
using Riskeer.Integration.Data.StandAlone;
-using Riskeer.Integration.Forms.PresentationObjects;
+using Riskeer.Integration.Forms.PresentationObjects.StandAlone;
namespace Riskeer.Integration.Plugin.Test.ViewInfos
{