Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs =================================================================== diff -u -r8149c2c7c7024e6602c1017be03b9888ac56adf3 -r50a62edbe5db7e54dadeaa7d005eed6a8e77b642 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs (.../AssessmentSectionAssemblyCalculatorOld.cs) (revision 8149c2c7c7024e6602c1017be03b9888ac56adf3) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs (.../AssessmentSectionAssemblyCalculatorOld.cs) (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -114,7 +114,7 @@ AssessmentSectionAssemblyInputCreator.CreateFailureMechanismCategory(failureMechanismsWithoutProbability), AssessmentSectionAssemblyInputCreator.CreateFailureMechanismAssemblyResult(failureMechanismsWithProbability)); - return AssemblyCategoryCreator.CreateAssessmentSectionAssemblyCategory(output); + return AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategory(output); } catch (AssemblyException e) { Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs =================================================================== diff -u -r7b85b872a5fb870af978dcd26fdfbd52f12b288c -r50a62edbe5db7e54dadeaa7d005eed6a8e77b642 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision 7b85b872a5fb870af978dcd26fdfbd52f12b288c) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -61,7 +61,7 @@ CategoriesList output = kernel.CalculateAssessmentSectionCategoryLimitsWbi21( new AssessmentSection(1, signalingNorm, lowerLimitNorm)); - return AssemblyCategoryCreator.CreateAssessmentSectionAssemblyCategories(output); + return AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategories(output); } catch (AssemblyException e) { Fisheye: Tag 50a62edbe5db7e54dadeaa7d005eed6a8e77b642 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/AssemblyCategoryCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/AssemblyCategoryCreatorOld.cs =================================================================== diff -u --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/AssemblyCategoryCreatorOld.cs (revision 0) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/AssemblyCategoryCreatorOld.cs (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -0,0 +1,162 @@ +// 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.ComponentModel; +using System.Linq; +using Assembly.Kernel.Old.Model; +using Assembly.Kernel.Old.Model.CategoryLimits; +using Riskeer.AssemblyTool.Data; + +namespace Riskeer.AssemblyTool.KernelWrapper.Creators +{ + /// + /// Creates instances. + /// + internal static class AssemblyCategoryCreatorOld + { + /// + /// Creates a collection of + /// based on the information given in the . + /// + /// The with + /// to create the result for. + /// A collection of + /// with information taken from the . + /// Thrown when is null. + /// Thrown when + /// contains an invalid value. + /// Thrown when + /// contains a valid value, but unsupported. + public static IEnumerable CreateAssessmentSectionAssemblyCategories( + CategoriesList categories) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.Categories.Select( + categoriesOutput => new AssessmentSectionAssemblyCategory( + categoriesOutput.LowerLimit, + categoriesOutput.UpperLimit, + CreateAssessmentSectionAssemblyCategory(categoriesOutput.Category))).ToArray(); + } + + /// + /// Creates a collection of + /// based on the information given in the . + /// + /// The + /// with to create the result for. + /// A collection of + /// with information taken from the . + /// Thrown when is null. + /// Thrown when + /// contains an invalid value. + /// Thrown when + /// contains a valid value, but unsupported. + public static IEnumerable CreateFailureMechanismAssemblyCategories( + CategoriesList categories) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.Categories.Select( + categoriesOutput => new FailureMechanismAssemblyCategory( + categoriesOutput.LowerLimit, + categoriesOutput.UpperLimit, + FailureMechanismAssemblyCreator.CreateFailureMechanismAssemblyCategoryGroup(categoriesOutput.Category))).ToArray(); + } + + /// + /// Creates a collection of + /// based on the information given in the . + /// + /// The with + /// to create the result for. + /// A collection of + /// with information taken from the . + /// Thrown when is null. + /// Thrown when + /// contains an invalid value. + /// Thrown when + /// contains a valid value, but unsupported. + public static IEnumerable CreateFailureMechanismSectionAssemblyCategories( + CategoriesList categories) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.Categories.Select( + categoriesOutput => new FailureMechanismSectionAssemblyCategory( + categoriesOutput.LowerLimit, + categoriesOutput.UpperLimit, + FailureMechanismSectionAssemblyCreatorOld.CreateFailureMechanismSectionAssemblyCategoryGroup(categoriesOutput.Category))).ToArray(); + } + + /// + /// Creates a based on . + /// + /// The to convert. + /// A based on . + /// Thrown when + /// is an invalid value. + /// Thrown when + /// is a valid value, but unsupported. + public static AssessmentSectionAssemblyCategoryGroup CreateAssessmentSectionAssemblyCategory(EAssessmentGrade category) + { + if (!Enum.IsDefined(typeof(EAssessmentGrade), category)) + { + throw new InvalidEnumArgumentException(nameof(category), + (int) category, + typeof(EAssessmentGrade)); + } + + switch (category) + { + case EAssessmentGrade.APlus: + return AssessmentSectionAssemblyCategoryGroup.APlus; + case EAssessmentGrade.A: + return AssessmentSectionAssemblyCategoryGroup.A; + case EAssessmentGrade.B: + return AssessmentSectionAssemblyCategoryGroup.B; + case EAssessmentGrade.C: + return AssessmentSectionAssemblyCategoryGroup.C; + case EAssessmentGrade.D: + return AssessmentSectionAssemblyCategoryGroup.D; + case EAssessmentGrade.Gr: + return AssessmentSectionAssemblyCategoryGroup.None; + case EAssessmentGrade.Ngo: + return AssessmentSectionAssemblyCategoryGroup.NotAssessed; + case EAssessmentGrade.Nvt: + return AssessmentSectionAssemblyCategoryGroup.NotApplicable; + default: + throw new NotSupportedException(); + } + } + } +} \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs =================================================================== diff -u -ra6b2063a8e4b0fb39091ab692defbd67350d4016 -r50a62edbe5db7e54dadeaa7d005eed6a8e77b642 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs (.../AssessmentSectionAssemblyCalculatorOldTest.cs) (revision a6b2063a8e4b0fb39091ab692defbd67350d4016) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs (.../AssessmentSectionAssemblyCalculatorOldTest.cs) (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -489,7 +489,7 @@ failureMechanismsWithProbability); // Assert - AssessmentSectionAssemblyCategoryGroup expectedAssembly = AssemblyCategoryCreator.CreateAssessmentSectionAssemblyCategory(kernel.AssessmentSectionAssemblyResult); + AssessmentSectionAssemblyCategoryGroup expectedAssembly = AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategory(kernel.AssessmentSectionAssemblyResult); Assert.AreEqual(expectedAssembly, assembly); } } Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorOldTest.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorOldTest.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorOldTest.cs (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -0,0 +1,284 @@ +// 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.ComponentModel; +using System.Linq; +using Assembly.Kernel.Old.Model; +using Assembly.Kernel.Old.Model.CategoryLimits; +using Assembly.Kernel.Old.Model.FmSectionTypes; +using Core.Common.TestUtil; +using NUnit.Framework; +using Riskeer.AssemblyTool.Data; +using Riskeer.AssemblyTool.KernelWrapper.Creators; +using Riskeer.AssemblyTool.KernelWrapper.TestUtil; + +namespace Riskeer.AssemblyTool.KernelWrapper.Test.Creators +{ + [TestFixture] + public class AssemblyCategoryCreatorOldTest + { + [Test] + public void CreateAssessmentSectionAssemblyCategories_CategoriesNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategories(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("categories", exception.ParamName); + } + + [Test] + public void CreateAssessmentSectionAssemblyCategories_WithAssessmentSectionCategories_ReturnAssessmentSectionAssemblyCategories() + { + // Setup + var random = new Random(11); + + var categories = new CategoriesList(new[] + { + new AssessmentSectionCategory(random.NextEnumValue(), 0, 0.25), + new AssessmentSectionCategory(random.NextEnumValue(), 0.25, 0.5), + new AssessmentSectionCategory(random.NextEnumValue(), 0.5, 0.75), + new AssessmentSectionCategory(random.NextEnumValue(), 0.75, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategories(categories); + + // Assert + AssemblyCategoryAssert.AssertAssessmentSectionAssemblyCategories(categories, result); + } + + [Test] + public void CreateAssessmentSectionAssemblyCategories_CategoryWithInvalidAssessmentGrade_ThrowsInvalidEnumArgumentException() + { + // Setup + var categories = new CategoriesList(new[] + { + new AssessmentSectionCategory((EAssessmentGrade) 99, 0, 1) + }); + + // Call + TestDelegate test = () => AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategories(categories); + + // Assert + const string exceptionMessage = "The value of argument 'category' (99) is invalid for Enum type 'EAssessmentGrade'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, exceptionMessage); + } + + [Test] + [TestCaseSource(typeof(AssessmentGradeConversionTestHelperOld), nameof(AssessmentGradeConversionTestHelperOld.AssessmentGradeConversionCases))] + public void CreateAssessmentSectionAssemblyCategories_CategoryWithValidAssessmentGrade_ExpectedAssessmentSectionAssemblyCategoryResultType( + EAssessmentGrade categoryGroup, + AssessmentSectionAssemblyCategoryGroup expectedCategoryGroup) + { + // Setup + var categories = new CategoriesList(new[] + { + new AssessmentSectionCategory(categoryGroup, 0, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategories(categories); + + // Assert + Assert.AreEqual(expectedCategoryGroup, result.Single().Group); + } + + [Test] + public void CreateAssessmentSectionAssemblyCategoryGroup_WithInvalidAssessmentGrade_ThrowsInvalidEnumArgumentException() + { + // Call + TestDelegate test = () => AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategory((EAssessmentGrade) 99); + + // Assert + const string exceptionMessage = "The value of argument 'category' (99) is invalid for Enum type 'EAssessmentGrade'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, exceptionMessage); + } + + [Test] + [TestCaseSource(typeof(AssessmentGradeConversionTestHelperOld), nameof(AssessmentGradeConversionTestHelperOld.AssessmentGradeConversionCases))] + public void CreateAssessmentSectionAssemblyCategory_WithValidAssessmentGrade_ExpectedAssessmentSectionAssemblyCategoryResultType( + EAssessmentGrade categoryGroup, + AssessmentSectionAssemblyCategoryGroup expectedCategoryGroup) + { + // Call + AssessmentSectionAssemblyCategoryGroup categoryResult = AssemblyCategoryCreatorOld.CreateAssessmentSectionAssemblyCategory(categoryGroup); + + // Assert + Assert.AreEqual(expectedCategoryGroup, categoryResult); + } + + [Test] + public void CreateFailureMechanismAssemblyCategories_CategoriesNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => AssemblyCategoryCreatorOld.CreateFailureMechanismAssemblyCategories(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("categories", exception.ParamName); + } + + [Test] + public void CreateFailureMechanismAssemblyCategories_WithCategories_ReturnFailureMechanismAssemblyCategoryResult() + { + // Setup + var random = new Random(11); + + var categories = new CategoriesList(new[] + { + new FailureMechanismCategory(random.NextEnumValue(), 0, 0.25), + new FailureMechanismCategory(random.NextEnumValue(), 0.25, 0.5), + new FailureMechanismCategory(random.NextEnumValue(), 0.5, 0.75), + new FailureMechanismCategory(random.NextEnumValue(), 0.75, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateFailureMechanismAssemblyCategories(categories); + + // Assert + AssemblyCategoryAssert.AssertFailureMechanismAssemblyCategories(categories, result); + } + + [Test] + public void CreateFailureMechanismAssemblyCategories_CategoryWithInvalidFailureMechanismCategory_ThrowsInvalidEnumArgumentException() + { + // Setup + var categories = new CategoriesList(new[] + { + new FailureMechanismCategory((EFailureMechanismCategory) 99, 0, 1) + }); + + // Call + TestDelegate test = () => AssemblyCategoryCreatorOld.CreateFailureMechanismAssemblyCategories(categories); + + // Assert + const string exceptionMessage = "The value of argument 'category' (99) is invalid for Enum type 'EFailureMechanismCategory'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, exceptionMessage); + } + + [Test] + [TestCase(EFailureMechanismCategory.It, FailureMechanismAssemblyCategoryGroup.It)] + [TestCase(EFailureMechanismCategory.IIt, FailureMechanismAssemblyCategoryGroup.IIt)] + [TestCase(EFailureMechanismCategory.IIIt, FailureMechanismAssemblyCategoryGroup.IIIt)] + [TestCase(EFailureMechanismCategory.IVt, FailureMechanismAssemblyCategoryGroup.IVt)] + [TestCase(EFailureMechanismCategory.Vt, FailureMechanismAssemblyCategoryGroup.Vt)] + [TestCase(EFailureMechanismCategory.VIt, FailureMechanismAssemblyCategoryGroup.VIt)] + [TestCase(EFailureMechanismCategory.VIIt, FailureMechanismAssemblyCategoryGroup.VIIt)] + [TestCase(EFailureMechanismCategory.Nvt, FailureMechanismAssemblyCategoryGroup.NotApplicable)] + [TestCase(EFailureMechanismCategory.Gr, FailureMechanismAssemblyCategoryGroup.None)] + public void CreateFailureMechanismAssemblyCategories_CategoryWithValidFailureMechanismCategory_ExpectedFailureMechanismAssemblyCategoryResultType( + EFailureMechanismCategory categoryGroup, + FailureMechanismAssemblyCategoryGroup expectedCategoryGroup) + { + // Setup + var categories = new CategoriesList(new[] + { + new FailureMechanismCategory(categoryGroup, 0, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateFailureMechanismAssemblyCategories(categories); + + // Assert + Assert.AreEqual(expectedCategoryGroup, result.Single().Group); + } + + [Test] + public void CreateFailureMechanismSectionAssemblyCategories_CategoriesNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => AssemblyCategoryCreatorOld.CreateFailureMechanismSectionAssemblyCategories(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("categories", exception.ParamName); + } + + [Test] + public void CreateFailureMechanismSectionAssemblyCategories_WithCategories_ReturnFailureMechanismSectionAssemblyCategoryResult() + { + // Setup + var random = new Random(11); + + var categories = new CategoriesList(new[] + { + new FmSectionCategory(random.NextEnumValue(), 0, 0.25), + new FmSectionCategory(random.NextEnumValue(), 0.25, 0.5), + new FmSectionCategory(random.NextEnumValue(), 0.5, 0.75), + new FmSectionCategory(random.NextEnumValue(), 0.75, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateFailureMechanismSectionAssemblyCategories(categories); + + // Assert + AssemblyCategoryAssert.AssertFailureMechanismSectionAssemblyCategories(categories, result); + } + + [Test] + public void CreateFailureMechanismSectionAssemblyCategories_CategoryWithInvalidFailureMechanismSectionCategory_ThrowsInvalidEnumArgumentException() + { + // Setup + var categories = new CategoriesList(new[] + { + new FmSectionCategory((EFmSectionCategory) 99, 0, 1) + }); + + // Call + TestDelegate test = () => AssemblyCategoryCreatorOld.CreateFailureMechanismSectionAssemblyCategories(categories); + + // Assert + const string exceptionMessage = "The value of argument 'category' (99) is invalid for Enum type 'EFmSectionCategory'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, exceptionMessage); + } + + [Test] + [TestCase(EFmSectionCategory.Iv, FailureMechanismSectionAssemblyCategoryGroup.Iv)] + [TestCase(EFmSectionCategory.IIv, FailureMechanismSectionAssemblyCategoryGroup.IIv)] + [TestCase(EFmSectionCategory.IIIv, FailureMechanismSectionAssemblyCategoryGroup.IIIv)] + [TestCase(EFmSectionCategory.IVv, FailureMechanismSectionAssemblyCategoryGroup.IVv)] + [TestCase(EFmSectionCategory.Vv, FailureMechanismSectionAssemblyCategoryGroup.Vv)] + [TestCase(EFmSectionCategory.VIv, FailureMechanismSectionAssemblyCategoryGroup.VIv)] + [TestCase(EFmSectionCategory.VIIv, FailureMechanismSectionAssemblyCategoryGroup.VIIv)] + [TestCase(EFmSectionCategory.NotApplicable, FailureMechanismSectionAssemblyCategoryGroup.NotApplicable)] + [TestCase(EFmSectionCategory.Gr, FailureMechanismSectionAssemblyCategoryGroup.None)] + public void CreateFailureMechanismSectionAssemblyCategories_CategoryWithValidFailureMechanismSectionCategory_ExpectedFailureMechanismSectionAssemblyCategoryResultType( + EFmSectionCategory categoryGroup, + FailureMechanismSectionAssemblyCategoryGroup expectedCategoryGroup) + { + // Setup + var categories = new CategoriesList(new[] + { + new FmSectionCategory(categoryGroup, 0, 1) + }); + + // Call + IEnumerable result = AssemblyCategoryCreatorOld.CreateFailureMechanismSectionAssemblyCategories(categories); + + // Assert + Assert.AreEqual(expectedCategoryGroup, result.Single().Group); + } + } +} \ No newline at end of file Fisheye: Tag 50a62edbe5db7e54dadeaa7d005eed6a8e77b642 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentGradeConversionTestHelperOld.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentGradeConversionTestHelperOld.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/AssessmentGradeConversionTestHelperOld.cs (revision 50a62edbe5db7e54dadeaa7d005eed6a8e77b642) @@ -0,0 +1,53 @@ +// 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 Assembly.Kernel.Old.Model; +using NUnit.Framework; +using Riskeer.AssemblyTool.Data; + +namespace Riskeer.AssemblyTool.KernelWrapper.TestUtil +{ + /// + /// Class that can be used to assert the conversions of . + /// + public static class AssessmentGradeConversionTestHelperOld + { + /// + /// Gets a collection of test cases to test the conversion between + /// and . + /// + public static IEnumerable AssessmentGradeConversionCases + { + get + { + yield return new TestCaseData(EAssessmentGrade.APlus, AssessmentSectionAssemblyCategoryGroup.APlus); + yield return new TestCaseData(EAssessmentGrade.A, AssessmentSectionAssemblyCategoryGroup.A); + yield return new TestCaseData(EAssessmentGrade.B, AssessmentSectionAssemblyCategoryGroup.B); + yield return new TestCaseData(EAssessmentGrade.C, AssessmentSectionAssemblyCategoryGroup.C); + yield return new TestCaseData(EAssessmentGrade.D, AssessmentSectionAssemblyCategoryGroup.D); + yield return new TestCaseData(EAssessmentGrade.Gr, AssessmentSectionAssemblyCategoryGroup.None); + yield return new TestCaseData(EAssessmentGrade.Nvt, AssessmentSectionAssemblyCategoryGroup.NotApplicable); + yield return new TestCaseData(EAssessmentGrade.Ngo, AssessmentSectionAssemblyCategoryGroup.NotAssessed); + } + } + } +} \ No newline at end of file