Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssembly.cs
===================================================================
diff -u -r546f8dd1d783c34c264ed5c535d24bb318479756 -rf61cc468252210ab29ed64e50f14b2a8054059b1
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssembly.cs (.../FailureMechanismSectionAssembly.cs) (revision 546f8dd1d783c34c264ed5c535d24bb318479756)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssembly.cs (.../FailureMechanismSectionAssembly.cs) (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -32,16 +32,16 @@
/// The probability of the failure mechanism section, expressed for profile
/// The probability of the failure mechanism section, expressed for the section.
/// The length effect of the failure mechanism section.
- /// The .
+ /// The .
public FailureMechanismSectionAssembly(double profileProbability,
double sectionProbability,
double n,
- FailureMechanismSectionInterpretationCategory interpretationCategory)
+ FailureMechanismSectionAssemblyGroup assemblyGroup)
{
ProfileProbability = profileProbability;
SectionProbability = sectionProbability;
N = n;
- InterpretationCategory = interpretationCategory;
+ AssemblyGroup = assemblyGroup;
}
///
@@ -60,8 +60,8 @@
public double N { get; }
///
- /// Gets the .
+ /// Gets the .
///
- public FailureMechanismSectionInterpretationCategory InterpretationCategory { get; }
+ public FailureMechanismSectionAssemblyGroup AssemblyGroup { get; }
}
}
\ No newline at end of file
Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssemblyGroup.cs
===================================================================
diff -u
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssemblyGroup.cs (revision 0)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionAssemblyGroup.cs (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -0,0 +1,84 @@
+// 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.
+
+namespace Riskeer.AssemblyTool.Data
+{
+ ///
+ /// Enum defining the assembly categories for a failure mechanism section.
+ ///
+ public enum FailureMechanismSectionAssemblyGroup
+ {
+ ///
+ /// Represents the interpretation category ND (Not Dominant) for a failure mechanism section.
+ ///
+ ND = 1,
+
+ ///
+ /// Represents the interpretation category III for a failure mechanism section.
+ ///
+ III = 2,
+
+ ///
+ /// Represents the interpretation category II for a failure mechanism section.
+ ///
+ II = 3,
+
+ ///
+ /// Represents the interpretation category I for a failure mechanism section.
+ ///
+ I = 4,
+
+ ///
+ /// Represents the interpretation category 0+ for a failure mechanism section.
+ ///
+ ZeroPlus = 5,
+
+ ///
+ /// Represents the interpretation category 0 for a failure mechanism section.
+ ///
+ Zero = 6,
+
+ ///
+ /// Represents the interpretation category I- for a failure mechanism section.
+ ///
+ IMin = 7,
+
+ ///
+ /// Represents the interpretation category II- for a failure mechanism section.
+ ///
+ IIMin = 8,
+
+ ///
+ /// Represents the interpretation category III- for a failure mechanism section.
+ ///
+ IIIMin = 9,
+
+ ///
+ /// Represents the interpretation category D (Dominant) for a failure mechanism section.
+ ///
+ D = 10,
+
+ ///
+ /// Represents the interpretation category GR for a failure mechanism section.
+ ///
+ Gr = 11
+ }
+}
\ No newline at end of file
Fisheye: Tag f61cc468252210ab29ed64e50f14b2a8054059b1 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/FailureMechanismSectionInterpretationCategory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionAssemblyCreator.cs
===================================================================
diff -u -re7f63f7f06de9f7040355e630a4dffb0dcc889d1 -rf61cc468252210ab29ed64e50f14b2a8054059b1
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionAssemblyCreator.cs (.../FailureMechanismSectionAssemblyCreator.cs) (revision e7f63f7f06de9f7040355e630a4dffb0dcc889d1)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionAssemblyCreator.cs (.../FailureMechanismSectionAssemblyCreator.cs) (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -29,7 +29,7 @@
{
///
/// Creates instances and
- /// values.
+ /// values.
///
internal static class FailureMechanismSectionAssemblyCreator
{
@@ -53,19 +53,19 @@
return new FailureMechanismSectionAssembly(result.ProbabilityProfile.Value,
result.ProbabilitySection.Value,
result.NSection,
- CreateFailureMechanismSectionInterpretationCategory(result.InterpretationCategory));
+ CreateFailureMechanismSectionAssemblyGroup(result.InterpretationCategory));
}
///
- /// Converts a into a .
+ /// Converts a into a .
///
/// The to convert.
/// A based on .
/// Thrown when
/// is an invalid value.
/// Thrown when
/// is a valid value, but unsupported.
- public static FailureMechanismSectionInterpretationCategory CreateFailureMechanismSectionInterpretationCategory(EInterpretationCategory category)
+ public static FailureMechanismSectionAssemblyGroup CreateFailureMechanismSectionAssemblyGroup(EInterpretationCategory category)
{
if (!Enum.IsDefined(typeof(EInterpretationCategory), category))
{
@@ -77,27 +77,27 @@
switch (category)
{
case EInterpretationCategory.ND:
- return FailureMechanismSectionInterpretationCategory.ND;
+ return FailureMechanismSectionAssemblyGroup.ND;
case EInterpretationCategory.III:
- return FailureMechanismSectionInterpretationCategory.III;
+ return FailureMechanismSectionAssemblyGroup.III;
case EInterpretationCategory.II:
- return FailureMechanismSectionInterpretationCategory.II;
+ return FailureMechanismSectionAssemblyGroup.II;
case EInterpretationCategory.I:
- return FailureMechanismSectionInterpretationCategory.I;
+ return FailureMechanismSectionAssemblyGroup.I;
case EInterpretationCategory.ZeroPlus:
- return FailureMechanismSectionInterpretationCategory.ZeroPlus;
+ return FailureMechanismSectionAssemblyGroup.ZeroPlus;
case EInterpretationCategory.Zero:
- return FailureMechanismSectionInterpretationCategory.Zero;
+ return FailureMechanismSectionAssemblyGroup.Zero;
case EInterpretationCategory.IMin:
- return FailureMechanismSectionInterpretationCategory.IMin;
+ return FailureMechanismSectionAssemblyGroup.IMin;
case EInterpretationCategory.IIMin:
- return FailureMechanismSectionInterpretationCategory.IIMin;
+ return FailureMechanismSectionAssemblyGroup.IIMin;
case EInterpretationCategory.IIIMin:
- return FailureMechanismSectionInterpretationCategory.IIIMin;
+ return FailureMechanismSectionAssemblyGroup.IIIMin;
case EInterpretationCategory.D:
- return FailureMechanismSectionInterpretationCategory.D;
+ return FailureMechanismSectionAssemblyGroup.D;
case EInterpretationCategory.Gr:
- return FailureMechanismSectionInterpretationCategory.Gr;
+ return FailureMechanismSectionAssemblyGroup.Gr;
default:
throw new NotSupportedException();
}
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyGroupTest.cs
===================================================================
diff -u
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyGroupTest.cs (revision 0)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyGroupTest.cs (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -0,0 +1,69 @@
+// 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.Collections.Generic;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+
+namespace Riskeer.AssemblyTool.Data.Test
+{
+ [TestFixture]
+ public class FailureMechanismSectionAssemblyGroupTest : EnumValuesTestFixture
+ {
+ protected override IDictionary ExpectedValueForEnumValues =>
+ new Dictionary
+ {
+ {
+ FailureMechanismSectionAssemblyGroup.ND, 1
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.III, 2
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.II, 3
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.I, 4
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.ZeroPlus, 5
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.Zero, 6
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.IMin, 7
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.IIMin, 8
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.IIIMin, 9
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.D, 10
+ },
+ {
+ FailureMechanismSectionAssemblyGroup.Gr, 11
+ }
+ };
+ }
+}
\ No newline at end of file
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyTest.cs
===================================================================
diff -u -r546f8dd1d783c34c264ed5c535d24bb318479756 -rf61cc468252210ab29ed64e50f14b2a8054059b1
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyTest.cs (.../FailureMechanismSectionAssemblyTest.cs) (revision 546f8dd1d783c34c264ed5c535d24bb318479756)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionAssemblyTest.cs (.../FailureMechanismSectionAssemblyTest.cs) (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -36,7 +36,7 @@
double profileProbability = random.NextDouble();
double sectionProbability = random.NextDouble();
double n = random.NextDouble();
- var interpretationCategory = random.NextEnumValue();
+ var interpretationCategory = random.NextEnumValue();
// Call
var assembly = new FailureMechanismSectionAssembly(profileProbability,
@@ -48,7 +48,7 @@
Assert.AreEqual(profileProbability, assembly.ProfileProbability);
Assert.AreEqual(sectionProbability, assembly.SectionProbability);
Assert.AreEqual(n, assembly.N);
- Assert.AreEqual(interpretationCategory, assembly.InterpretationCategory);
+ Assert.AreEqual(interpretationCategory, assembly.AssemblyGroup);
}
}
}
\ No newline at end of file
Fisheye: Tag f61cc468252210ab29ed64e50f14b2a8054059b1 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/FailureMechanismSectionInterpretationCategoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs
===================================================================
diff -u -r0b0576379438cfbcfc61cd80b863db30d494a0bc -rf61cc468252210ab29ed64e50f14b2a8054059b1
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs (.../FailureMechanismSectionAssemblyCalculatorTest.cs) (revision 0b0576379438cfbcfc61cd80b863db30d494a0bc)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs (.../FailureMechanismSectionAssemblyCalculatorTest.cs) (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -167,8 +167,8 @@
Assert.AreEqual(kernelResult.ProbabilityProfile, result.ProfileProbability);
Assert.AreEqual(kernelResult.ProbabilitySection, result.SectionProbability);
- Assert.AreEqual(FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionInterpretationCategory(kernelResult.InterpretationCategory),
- result.InterpretationCategory);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionAssemblyGroup(kernelResult.InterpretationCategory),
+ result.AssemblyGroup);
}
}
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionAssemblyCreatorTest.cs
===================================================================
diff -u -re7f63f7f06de9f7040355e630a4dffb0dcc889d1 -rf61cc468252210ab29ed64e50f14b2a8054059b1
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionAssemblyCreatorTest.cs (.../FailureMechanismSectionAssemblyCreatorTest.cs) (revision e7f63f7f06de9f7040355e630a4dffb0dcc889d1)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionAssemblyCreatorTest.cs (.../FailureMechanismSectionAssemblyCreatorTest.cs) (revision f61cc468252210ab29ed64e50f14b2a8054059b1)
@@ -71,7 +71,7 @@
[TestCaseSource(nameof(GetValidCategoryConversions))]
public void CreateFailureMechanismSectionAssembly_WithValidResult_ReturnsExpectedFailureMechanismSectionAssembly(
EInterpretationCategory category,
- FailureMechanismSectionInterpretationCategory expectedCategory)
+ FailureMechanismSectionAssemblyGroup expectedCategory)
{
// Setup
var random = new Random(21);
@@ -89,14 +89,14 @@
Assert.AreEqual(profileProbability, createdAssembly.ProfileProbability);
Assert.AreEqual(sectionProbability, createdAssembly.SectionProbability);
Assert.AreEqual(result.NSection, createdAssembly.N);
- Assert.AreEqual(expectedCategory, createdAssembly.InterpretationCategory);
+ Assert.AreEqual(expectedCategory, createdAssembly.AssemblyGroup);
}
[Test]
- public void CreateFailureMechanismSectionInterpretationCategory_InvalidCategory_ThrowsInvalidEnumArgumentException()
+ public void CreateFailureMechanismSectionAssemblyGroup_InvalidCategory_ThrowsInvalidEnumArgumentException()
{
// Call
- void Call() => FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionInterpretationCategory((EInterpretationCategory) 99);
+ void Call() => FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionAssemblyGroup((EInterpretationCategory) 99);
// Assert
var expectedMessage = $"The value of argument 'category' (99) is invalid for Enum type '{nameof(EInterpretationCategory)}'.";
@@ -105,30 +105,30 @@
[Test]
[TestCaseSource(nameof(GetValidCategoryConversions))]
- public void CreateFailureMechanismSectionInterpretationCategory_ValidCategory_ReturnsExpectedValue(
+ public void CreateFailureMechanismSectionAssemblyGroup_ValidCategory_ReturnsExpectedValue(
EInterpretationCategory category,
- FailureMechanismSectionInterpretationCategory expectedCategory)
+ FailureMechanismSectionAssemblyGroup expectedCategory)
{
// Call
- FailureMechanismSectionInterpretationCategory createdCategory = FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionInterpretationCategory(category);
+ FailureMechanismSectionAssemblyGroup createdCategory = FailureMechanismSectionAssemblyCreator.CreateFailureMechanismSectionAssemblyGroup(category);
// Assert
Assert.AreEqual(expectedCategory, createdCategory);
}
private static IEnumerable GetValidCategoryConversions()
{
- yield return new TestCaseData(EInterpretationCategory.ND, FailureMechanismSectionInterpretationCategory.ND);
- yield return new TestCaseData(EInterpretationCategory.III, FailureMechanismSectionInterpretationCategory.III);
- yield return new TestCaseData(EInterpretationCategory.II, FailureMechanismSectionInterpretationCategory.II);
- yield return new TestCaseData(EInterpretationCategory.I, FailureMechanismSectionInterpretationCategory.I);
- yield return new TestCaseData(EInterpretationCategory.ZeroPlus, FailureMechanismSectionInterpretationCategory.ZeroPlus);
- yield return new TestCaseData(EInterpretationCategory.Zero, FailureMechanismSectionInterpretationCategory.Zero);
- yield return new TestCaseData(EInterpretationCategory.IMin, FailureMechanismSectionInterpretationCategory.IMin);
- yield return new TestCaseData(EInterpretationCategory.IIMin, FailureMechanismSectionInterpretationCategory.IIMin);
- yield return new TestCaseData(EInterpretationCategory.IIIMin, FailureMechanismSectionInterpretationCategory.IIIMin);
- yield return new TestCaseData(EInterpretationCategory.D, FailureMechanismSectionInterpretationCategory.D);
- yield return new TestCaseData(EInterpretationCategory.Gr, FailureMechanismSectionInterpretationCategory.Gr);
+ yield return new TestCaseData(EInterpretationCategory.ND, FailureMechanismSectionAssemblyGroup.ND);
+ yield return new TestCaseData(EInterpretationCategory.III, FailureMechanismSectionAssemblyGroup.III);
+ yield return new TestCaseData(EInterpretationCategory.II, FailureMechanismSectionAssemblyGroup.II);
+ yield return new TestCaseData(EInterpretationCategory.I, FailureMechanismSectionAssemblyGroup.I);
+ yield return new TestCaseData(EInterpretationCategory.ZeroPlus, FailureMechanismSectionAssemblyGroup.ZeroPlus);
+ yield return new TestCaseData(EInterpretationCategory.Zero, FailureMechanismSectionAssemblyGroup.Zero);
+ yield return new TestCaseData(EInterpretationCategory.IMin, FailureMechanismSectionAssemblyGroup.IMin);
+ yield return new TestCaseData(EInterpretationCategory.IIMin, FailureMechanismSectionAssemblyGroup.IIMin);
+ yield return new TestCaseData(EInterpretationCategory.IIIMin, FailureMechanismSectionAssemblyGroup.IIIMin);
+ yield return new TestCaseData(EInterpretationCategory.D, FailureMechanismSectionAssemblyGroup.D);
+ yield return new TestCaseData(EInterpretationCategory.Gr, FailureMechanismSectionAssemblyGroup.Gr);
}
}
}
\ No newline at end of file