Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategory.cs
===================================================================
diff -u -r8bd83f4b0e42485f9ce1e0101afba13744102b24 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategory.cs (.../AssessmentSectionAssemblyCategory.cs) (revision 8bd83f4b0e42485f9ce1e0101afba13744102b24)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategory.cs (.../AssessmentSectionAssemblyCategory.cs) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -31,16 +31,16 @@
///
/// The lower boundary of the category.
/// The upper boundary of the category.
- /// The type of the category.
- public AssessmentSectionAssemblyCategory(double lowerBoundary, double upperBoundary, AssessmentSectionAssemblyCategoryType type)
+ /// The group of the category.
+ public AssessmentSectionAssemblyCategory(double lowerBoundary, double upperBoundary, AssessmentSectionAssemblyCategoryGroup group)
: base(lowerBoundary, upperBoundary)
{
- Type = type;
+ Group = group;
}
///
- /// Gets the type of the assembly category.
+ /// Gets the group of the assembly category.
///
- public AssessmentSectionAssemblyCategoryType Type { get; }
+ public AssessmentSectionAssemblyCategoryGroup Group { get; }
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategoryGroup.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategoryGroup.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategoryGroup.cs (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -0,0 +1,35 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets 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 Ringtoets.Common.Data.AssemblyTool
+{
+ ///
+ /// Enum defining the assembly categories for an assessment section.
+ ///
+ public enum AssessmentSectionAssemblyCategoryGroup
+ {
+ APlus = 1,
+ A = 2,
+ B = 3,
+ C = 4,
+ D = 5
+ }
+}
\ No newline at end of file
Fisheye: Tag 77da7f1567a6c758907e3a4a187c2698116a655b refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssessmentSectionAssemblyCategoryType.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -ra2916c19f07e0af3138fe5ae29c001ba3d293e56 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision a2916c19f07e0af3138fe5ae29c001ba3d293e56)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -19,7 +19,7 @@
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.Service/AssemblyTool/AssemblyCategoryConverter.cs
===================================================================
diff -u -rccc77eb1d25d2f6e73e7b6547f2cc87b4d077713 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/src/Ringtoets.Common.Service/AssemblyTool/AssemblyCategoryConverter.cs (.../AssemblyCategoryConverter.cs) (revision ccc77eb1d25d2f6e73e7b6547f2cc87b4d077713)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/AssemblyTool/AssemblyCategoryConverter.cs (.../AssemblyCategoryConverter.cs) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -72,7 +72,7 @@
try
{
return new AssessmentSectionAssemblyCategory(result.LowerBoundary, result.UpperBoundary,
- ConvertAssessmentSectionAssemblyCategoryType(result.Category));
+ ConvertToAssessmentSectionAssemblyCategoryGroup(result.Category));
}
catch (Exception e) when (e is InvalidEnumArgumentException || e is NotSupportedException)
{
@@ -82,15 +82,15 @@
///
/// Converts into
- /// .
+ /// .
///
/// The category type to convert.
- /// The converted category type.
+ /// The converted category group.
/// /// Thrown when
/// is an invalid value.
/// Thrown when
/// is a valid value, but unsupported.
- private static AssessmentSectionAssemblyCategoryType ConvertAssessmentSectionAssemblyCategoryType(
+ private static AssessmentSectionAssemblyCategoryGroup ConvertToAssessmentSectionAssemblyCategoryGroup(
AssessmentSectionAssemblyCategoryResultType categoryType)
{
if (!Enum.IsDefined(typeof(AssessmentSectionAssemblyCategoryResultType), categoryType))
@@ -103,15 +103,15 @@
switch (categoryType)
{
case AssessmentSectionAssemblyCategoryResultType.APlus:
- return AssessmentSectionAssemblyCategoryType.APlus;
+ return AssessmentSectionAssemblyCategoryGroup.APlus;
case AssessmentSectionAssemblyCategoryResultType.A:
- return AssessmentSectionAssemblyCategoryType.A;
+ return AssessmentSectionAssemblyCategoryGroup.A;
case AssessmentSectionAssemblyCategoryResultType.B:
- return AssessmentSectionAssemblyCategoryType.B;
+ return AssessmentSectionAssemblyCategoryGroup.B;
case AssessmentSectionAssemblyCategoryResultType.C:
- return AssessmentSectionAssemblyCategoryType.C;
+ return AssessmentSectionAssemblyCategoryGroup.C;
case AssessmentSectionAssemblyCategoryResultType.D:
- return AssessmentSectionAssemblyCategoryType.D;
+ return AssessmentSectionAssemblyCategoryGroup.D;
default:
throw new NotSupportedException();
}
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryGroupTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryGroupTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryGroupTest.cs (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -0,0 +1,57 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets 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;
+using Ringtoets.Common.Data.AssemblyTool;
+
+namespace Ringtoets.Common.Data.Test.AssemblyTool
+{
+ [TestFixture]
+ public class AssessmentSectionAssemblyCategoryGroupTest : EnumValuesTestFixture
+ {
+ protected override IDictionary ExpectedValueForEnumValues
+ {
+ get
+ {
+ return new Dictionary
+ {
+ {
+ AssessmentSectionAssemblyCategoryGroup.APlus, 1
+ },
+ {
+ AssessmentSectionAssemblyCategoryGroup.A, 2
+ },
+ {
+ AssessmentSectionAssemblyCategoryGroup.B, 3
+ },
+ {
+ AssessmentSectionAssemblyCategoryGroup.C, 4
+ },
+ {
+ AssessmentSectionAssemblyCategoryGroup.D, 5
+ }
+ };
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryTest.cs
===================================================================
diff -u -rccc77eb1d25d2f6e73e7b6547f2cc87b4d077713 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryTest.cs (.../AssessmentSectionAssemblyCategoryTest.cs) (revision ccc77eb1d25d2f6e73e7b6547f2cc87b4d077713)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryTest.cs (.../AssessmentSectionAssemblyCategoryTest.cs) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -34,7 +34,7 @@
{
// Setup
var random = new Random(39);
- var categoryType = random.NextEnumValue();
+ var categoryType = random.NextEnumValue();
double lowerBoundary = random.NextDouble();
double upperBoundary = random.NextDouble();
@@ -45,7 +45,7 @@
Assert.IsInstanceOf(category);
Assert.AreEqual(lowerBoundary, category.LowerBoundary);
Assert.AreEqual(upperBoundary, category.UpperBoundary);
- Assert.AreEqual(categoryType, category.Type);
+ Assert.AreEqual(categoryType, category.Group);
}
}
}
\ No newline at end of file
Fisheye: Tag 77da7f1567a6c758907e3a4a187c2698116a655b refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssessmentSectionAssemblyCategoryTypeTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -ra2916c19f07e0af3138fe5ae29c001ba3d293e56 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision a2916c19f07e0af3138fe5ae29c001ba3d293e56)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -23,7 +23,7 @@
-
+
Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyCategoryConverterTest.cs
===================================================================
diff -u -rccc77eb1d25d2f6e73e7b6547f2cc87b4d077713 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyCategoryConverterTest.cs (.../AssemblyCategoryConverterTest.cs) (revision ccc77eb1d25d2f6e73e7b6547f2cc87b4d077713)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyCategoryConverterTest.cs (.../AssemblyCategoryConverterTest.cs) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -102,14 +102,14 @@
}
[Test]
- [TestCase(AssessmentSectionAssemblyCategoryResultType.APlus, AssessmentSectionAssemblyCategoryType.APlus)]
- [TestCase(AssessmentSectionAssemblyCategoryResultType.A, AssessmentSectionAssemblyCategoryType.A)]
- [TestCase(AssessmentSectionAssemblyCategoryResultType.B, AssessmentSectionAssemblyCategoryType.B)]
- [TestCase(AssessmentSectionAssemblyCategoryResultType.C, AssessmentSectionAssemblyCategoryType.C)]
- [TestCase(AssessmentSectionAssemblyCategoryResultType.D, AssessmentSectionAssemblyCategoryType.D)]
- public void ConvertToAssessmentSectionAssemblyCategories_CategoryWithValidType_ExpectedAssessmentSectionAssemblyCategoryType(
+ [TestCase(AssessmentSectionAssemblyCategoryResultType.APlus, AssessmentSectionAssemblyCategoryGroup.APlus)]
+ [TestCase(AssessmentSectionAssemblyCategoryResultType.A, AssessmentSectionAssemblyCategoryGroup.A)]
+ [TestCase(AssessmentSectionAssemblyCategoryResultType.B, AssessmentSectionAssemblyCategoryGroup.B)]
+ [TestCase(AssessmentSectionAssemblyCategoryResultType.C, AssessmentSectionAssemblyCategoryGroup.C)]
+ [TestCase(AssessmentSectionAssemblyCategoryResultType.D, AssessmentSectionAssemblyCategoryGroup.D)]
+ public void ConvertToAssessmentSectionAssemblyCategories_CategoryWithValidType_ExpectedAssessmentSectionAssemblyCategoryGroup(
AssessmentSectionAssemblyCategoryResultType resultType,
- AssessmentSectionAssemblyCategoryType expectedType)
+ AssessmentSectionAssemblyCategoryGroup expectedGroup)
{
// Setup
var result = new[]
@@ -124,7 +124,7 @@
Assert.AreEqual(1, categories.Count());
AssessmentSectionAssemblyCategory category = categories.First();
- Assert.AreEqual(expectedType, category.Type);
+ Assert.AreEqual(expectedGroup, category.Group);
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyToolCategoriesCalculationServiceTest.cs
===================================================================
diff -u -rccc77eb1d25d2f6e73e7b6547f2cc87b4d077713 -r77da7f1567a6c758907e3a4a187c2698116a655b
--- Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyToolCategoriesCalculationServiceTest.cs (.../AssemblyToolCategoriesCalculationServiceTest.cs) (revision ccc77eb1d25d2f6e73e7b6547f2cc87b4d077713)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/AssemblyTool/AssemblyToolCategoriesCalculationServiceTest.cs (.../AssemblyToolCategoriesCalculationServiceTest.cs) (revision 77da7f1567a6c758907e3a4a187c2698116a655b)
@@ -98,7 +98,7 @@
Assert.AreEqual(calculatorOutput.Length, output.Length);
CollectionAssert.AreEqual(calculatorOutput.Select(co => co.LowerBoundary), output.Select(o => o.LowerBoundary));
CollectionAssert.AreEqual(calculatorOutput.Select(co => co.UpperBoundary), output.Select(o => o.UpperBoundary));
- CollectionAssert.AreEqual(calculatorOutput.Select(co => GetAssessmentSectionAssemblyCategoryType(co.Category)), output.Select(o => o.Type));
+ CollectionAssert.AreEqual(calculatorOutput.Select(co => GetAssessmentSectionAssemblyCategoryType(co.Category)), output.Select(o => o.Group));
}
}
@@ -167,21 +167,21 @@
}
}
- private static AssessmentSectionAssemblyCategoryType GetAssessmentSectionAssemblyCategoryType(
+ private static AssessmentSectionAssemblyCategoryGroup GetAssessmentSectionAssemblyCategoryType(
AssessmentSectionAssemblyCategoryResultType categoryType)
{
switch (categoryType)
{
case AssessmentSectionAssemblyCategoryResultType.APlus:
- return AssessmentSectionAssemblyCategoryType.APlus;
+ return AssessmentSectionAssemblyCategoryGroup.APlus;
case AssessmentSectionAssemblyCategoryResultType.A:
- return AssessmentSectionAssemblyCategoryType.A;
+ return AssessmentSectionAssemblyCategoryGroup.A;
case AssessmentSectionAssemblyCategoryResultType.B:
- return AssessmentSectionAssemblyCategoryType.B;
+ return AssessmentSectionAssemblyCategoryGroup.B;
case AssessmentSectionAssemblyCategoryResultType.C:
- return AssessmentSectionAssemblyCategoryType.C;
+ return AssessmentSectionAssemblyCategoryGroup.C;
case AssessmentSectionAssemblyCategoryResultType.D:
- return AssessmentSectionAssemblyCategoryType.D;
+ return AssessmentSectionAssemblyCategoryGroup.D;
default:
throw new NotSupportedException();
}