Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/AssessmentSectionAssemblyResult.cs =================================================================== diff -u -r921a4a5b07e757058cfdf6a9be5d256cd08c8c12 -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/AssessmentSectionAssemblyResult.cs (.../AssessmentSectionAssemblyResult.cs) (revision 921a4a5b07e757058cfdf6a9be5d256cd08c8c12) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/AssessmentSectionAssemblyResult.cs (.../AssessmentSectionAssemblyResult.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -30,12 +30,12 @@ /// Creates a new instance of . /// /// The failure probability of the assessment section. - /// The . + /// The . public AssessmentSectionAssemblyResult(double probability, - AssessmentSectionAssemblyGroup assemblyCategoryGroup) + AssessmentSectionAssemblyGroup assemblyGroup) { Probability = probability; - AssemblyCategoryGroup = assemblyCategoryGroup; + AssemblyGroup = assemblyGroup; } /// @@ -46,6 +46,6 @@ /// /// Gets the . /// - public AssessmentSectionAssemblyGroup AssemblyCategoryGroup { get; } + public AssessmentSectionAssemblyGroup AssemblyGroup { get; } } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/AssessmentSectionAssemblyResultTest.cs =================================================================== diff -u -r921a4a5b07e757058cfdf6a9be5d256cd08c8c12 -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/AssessmentSectionAssemblyResultTest.cs (.../AssessmentSectionAssemblyResultTest.cs) (revision 921a4a5b07e757058cfdf6a9be5d256cd08c8c12) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/AssessmentSectionAssemblyResultTest.cs (.../AssessmentSectionAssemblyResultTest.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -34,14 +34,14 @@ // Setup var random = new Random(21); double probability = random.NextDouble(); - var category = random.NextEnumValue(); + var group = random.NextEnumValue(); // Call - var result = new AssessmentSectionAssemblyResult(probability, category); + var result = new AssessmentSectionAssemblyResult(probability, group); // Assert Assert.AreEqual(probability, result.Probability); - Assert.AreEqual(category, result.AssemblyCategoryGroup); + Assert.AreEqual(group, result.AssemblyGroup); } } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs =================================================================== diff -u -r57da5ea59cea2ac53c249bea9fe1dea9a9dfa5a0 -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs (.../AssessmentSectionAssemblyCalculatorTest.cs) (revision 57da5ea59cea2ac53c249bea9fe1dea9a9dfa5a0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs (.../AssessmentSectionAssemblyCalculatorTest.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -164,7 +164,7 @@ // Assert Assert.AreEqual(assemblyResult.FailureProbability, result.Probability); Assert.AreEqual(AssessmentSectionAssemblyGroupCreator.CreateAssessmentSectionAssemblyGroup(assemblyResult.Category), - result.AssemblyCategoryGroup); + result.AssemblyGroup); } } Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssessmentSectionAssemblyGroupBoundariesCalculatorTest.cs =================================================================== diff -u -r0b24c149862b56ef3d5defa149e12b7bc0d39473 -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssessmentSectionAssemblyGroupBoundariesCalculatorTest.cs (.../AssessmentSectionAssemblyGroupBoundariesCalculatorTest.cs) (revision 0b24c149862b56ef3d5defa149e12b7bc0d39473) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssessmentSectionAssemblyGroupBoundariesCalculatorTest.cs (.../AssessmentSectionAssemblyGroupBoundariesCalculatorTest.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -113,7 +113,7 @@ IEnumerable result = calculator.CalculateAssessmentSectionAssemblyGroupBoundaries(signalingNorm, lowerLimitNorm); // Assert - AssemblyCategoryAssert.AssertAssessmentSectionAssemblyGroups(output, result); + AssessmentSectionAssemblyGroupAssert.AssertAssessmentSectionAssemblyGroups(output, result); } } Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyResultCreatorTest.cs =================================================================== diff -u -r921a4a5b07e757058cfdf6a9be5d256cd08c8c12 -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyResultCreatorTest.cs (.../AssessmentSectionAssemblyResultCreatorTest.cs) (revision 921a4a5b07e757058cfdf6a9be5d256cd08c8c12) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyResultCreatorTest.cs (.../AssessmentSectionAssemblyResultCreatorTest.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -61,7 +61,7 @@ // Assert Assert.AreEqual(probability, createdResult.Probability); - Assert.AreEqual(expectedCategoryGroup, createdResult.AssemblyCategoryGroup); + Assert.AreEqual(expectedCategoryGroup, createdResult.AssemblyGroup); } } } \ No newline at end of file Fisheye: Tag b77387773ed1a5e62224afb2f84a555e03e35ba0 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssemblyCategoryAssert.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentSectionAssemblyGroupAssert.cs (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -0,0 +1,79 @@ +// 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 assessment section assembly groups result. + /// + public static class AssessmentSectionAssemblyGroupAssert + { + /// + /// Asserts whether is equal to . + /// + /// The original with + /// . + /// The actual collection of . + /// Thrown when + /// is not equal to . + public static void AssertAssessmentSectionAssemblyGroups(CategoriesList original, + IEnumerable actual) + { + Assert.AreEqual(original.Categories.Length, actual.Count()); + + CollectionAssert.AreEqual(original.Categories.Select(o => GetAssessmentSectionAssemblyGroup(o.Category)), actual.Select(r => r.Group)); + CollectionAssert.AreEqual(original.Categories.Select(o => o.LowerLimit.Value), actual.Select(r => r.LowerBoundary)); + CollectionAssert.AreEqual(original.Categories.Select(o => o.UpperLimit.Value), actual.Select(r => r.UpperBoundary)); + } + + private static AssessmentSectionAssemblyGroup GetAssessmentSectionAssemblyGroup(EAssessmentGrade group) + { + switch (group) + { + case EAssessmentGrade.APlus: + return AssessmentSectionAssemblyGroup.APlus; + case EAssessmentGrade.A: + return AssessmentSectionAssemblyGroup.A; + case EAssessmentGrade.B: + return AssessmentSectionAssemblyGroup.B; + case EAssessmentGrade.C: + return AssessmentSectionAssemblyGroup.C; + case EAssessmentGrade.D: + return AssessmentSectionAssemblyGroup.D; + case EAssessmentGrade.Gr: + return AssessmentSectionAssemblyGroup.None; + case EAssessmentGrade.Ngo: + return AssessmentSectionAssemblyGroup.NotAssessed; + case EAssessmentGrade.Nvt: + return AssessmentSectionAssemblyGroup.NotApplicable; + default: + throw new NotSupportedException(); + } + } + } +} \ No newline at end of file Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Controls/AssessmentSectionAssemblyResultControl.cs =================================================================== diff -u -r5c92c1b7301fef7753270ec2fde2f78af73ee48b -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/Integration/src/Riskeer.Integration.Forms/Controls/AssessmentSectionAssemblyResultControl.cs (.../AssessmentSectionAssemblyResultControl.cs) (revision 5c92c1b7301fef7753270ec2fde2f78af73ee48b) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Controls/AssessmentSectionAssemblyResultControl.cs (.../AssessmentSectionAssemblyResultControl.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -85,8 +85,8 @@ throw new ArgumentNullException(nameof(result)); } - groupLabel.Text = new EnumDisplayWrapper(result.AssemblyCategoryGroup).DisplayName; - groupLabel.BackColor = AssessmentSectionAssemblyGroupColorHelper.GetAssessmentSectionAssemblyGroupColor(result.AssemblyCategoryGroup); + groupLabel.Text = new EnumDisplayWrapper(result.AssemblyGroup).DisplayName; + groupLabel.BackColor = AssessmentSectionAssemblyGroupColorHelper.GetAssessmentSectionAssemblyGroupColor(result.AssemblyGroup); probabilityLabel.Text = ProbabilityFormattingHelper.FormatWithDiscreteNumbers(result.Probability); } Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Controls/AssessmentSectionAssemblyResultControlTest.cs =================================================================== diff -u -r5c92c1b7301fef7753270ec2fde2f78af73ee48b -rb77387773ed1a5e62224afb2f84a555e03e35ba0 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Controls/AssessmentSectionAssemblyResultControlTest.cs (.../AssessmentSectionAssemblyResultControlTest.cs) (revision 5c92c1b7301fef7753270ec2fde2f78af73ee48b) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Controls/AssessmentSectionAssemblyResultControlTest.cs (.../AssessmentSectionAssemblyResultControlTest.cs) (revision b77387773ed1a5e62224afb2f84a555e03e35ba0) @@ -118,7 +118,7 @@ // Assert BorderedLabel groupLabel = GetGroupLabel(resultControl); - AssertGroupLabel(result.AssemblyCategoryGroup, groupLabel); + AssertGroupLabel(result.AssemblyGroup, groupLabel); BorderedLabel probabilityLabel = GetProbabilityLabel(resultControl); AssertProbabilityLabel(result.Probability, probabilityLabel); @@ -139,7 +139,7 @@ // Precondition BorderedLabel groupLabel = GetGroupLabel(resultControl); - AssertGroupLabel(result.AssemblyCategoryGroup, groupLabel); + AssertGroupLabel(result.AssemblyGroup, groupLabel); BorderedLabel probabilityLabel = GetProbabilityLabel(resultControl); AssertProbabilityLabel(result.Probability, probabilityLabel);