Fisheye: Tag ed75969421ba19837b5d7e25d69b11dbef1978d7 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssemblyGroupBoundariesAssert.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs =================================================================== diff -u -r8a68895bd1459ff3707ef0e038e9fa14ceb4091a -red75969421ba19837b5d7e25d69b11dbef1978d7 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs (.../AssessmentSectionAssemblyGroupAssert.cs) (revision 8a68895bd1459ff3707ef0e038e9fa14ceb4091a) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs (.../AssessmentSectionAssemblyGroupAssert.cs) (revision ed75969421ba19837b5d7e25d69b11dbef1978d7) @@ -29,7 +29,7 @@ namespace Riskeer.AssemblyTool.KernelWrapper.TestUtil { /// - /// Class for asserting assessment section assembly groups result. + /// Class for asserting assessment section assembly groups. /// public static class AssessmentSectionAssemblyGroupAssert { Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/FailureMechanismSectionAssemblyGroupAssert.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/FailureMechanismSectionAssemblyGroupAssert.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/FailureMechanismSectionAssemblyGroupAssert.cs (revision ed75969421ba19837b5d7e25d69b11dbef1978d7) @@ -0,0 +1,90 @@ +// 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 System.Linq; +using Assembly.Kernel.Model.Categories; +using NUnit.Framework; +using Riskeer.AssemblyTool.Data; + +namespace Riskeer.AssemblyTool.KernelWrapper.TestUtil +{ + /// + /// Class for asserting failure mechanism section assembly groups. + /// + public static class AssemblyGroupBoundariesAssert + { + /// + /// Asserts whether is equal to . + /// + /// The original with + /// . + /// The actual collection of . + /// Thrown when + /// is not equal to . + public static void AssertFailureMechanismSectionAssemblyGroupBoundaries(CategoriesList original, + IEnumerable actual) + { + int expectedNrOfCategories = original.Categories.Length; + Assert.AreEqual(expectedNrOfCategories, actual.Count()); + + for (int i = 0; i < expectedNrOfCategories; i++) + { + InterpretationCategory originalItem = original.Categories.ElementAt(i); + FailureMechanismSectionAssemblyGroupBoundaries actualItem = actual.ElementAt(i); + + Assert.AreEqual(GetFailureMechanismSectionAssemblyGroup(originalItem.Category), actualItem.FailureMechanismSectionAssemblyGroup); + ProbabilityAssert.AreEqual(actualItem.LowerBoundary, originalItem.LowerLimit); + ProbabilityAssert.AreEqual(actualItem.UpperBoundary, originalItem.UpperLimit); + } + } + + private static FailureMechanismSectionAssemblyGroup GetFailureMechanismSectionAssemblyGroup(EInterpretationCategory category) + { + switch (category) + { + case EInterpretationCategory.NotDominant: + return FailureMechanismSectionAssemblyGroup.NotDominant; + case EInterpretationCategory.III: + return FailureMechanismSectionAssemblyGroup.III; + case EInterpretationCategory.II: + return FailureMechanismSectionAssemblyGroup.II; + case EInterpretationCategory.I: + return FailureMechanismSectionAssemblyGroup.I; + case EInterpretationCategory.Zero: + return FailureMechanismSectionAssemblyGroup.Zero; + case EInterpretationCategory.IMin: + return FailureMechanismSectionAssemblyGroup.IMin; + case EInterpretationCategory.IIMin: + return FailureMechanismSectionAssemblyGroup.IIMin; + case EInterpretationCategory.IIIMin: + return FailureMechanismSectionAssemblyGroup.IIIMin; + case EInterpretationCategory.Dominant: + return FailureMechanismSectionAssemblyGroup.Dominant; + case EInterpretationCategory.Gr: + return FailureMechanismSectionAssemblyGroup.Gr; + default: + throw new NotSupportedException(); + } + } + } +} \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/ProbabilityAssert.cs =================================================================== diff -u -rea195062546c9510b475b468797bea8f20bb4cbe -red75969421ba19837b5d7e25d69b11dbef1978d7 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/ProbabilityAssert.cs (.../ProbabilityAssert.cs) (revision ea195062546c9510b475b468797bea8f20bb4cbe) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/ProbabilityAssert.cs (.../ProbabilityAssert.cs) (revision ed75969421ba19837b5d7e25d69b11dbef1978d7) @@ -4,7 +4,7 @@ namespace Riskeer.AssemblyTool.KernelWrapper.TestUtil { /// - /// Class for asserting probabilities + /// Class for asserting probabilities. /// public static class ProbabilityAssert {