Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/AssemblyCategoryAssert.cs
===================================================================
diff -u -r87391c51bc397ae140d3aca7940b4f5ac80cad35 -r2f05c299a43f2b890e0276cf74078c616a3ca27d
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/AssemblyCategoryAssert.cs (.../AssemblyCategoryAssert.cs) (revision 87391c51bc397ae140d3aca7940b4f5ac80cad35)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/AssemblyCategoryAssert.cs (.../AssemblyCategoryAssert.cs) (revision 2f05c299a43f2b890e0276cf74078c616a3ca27d)
@@ -55,6 +55,23 @@
///
/// Asserts whether is equal to .
///
+ /// The original collection of .
+ /// The actual collection of .
+ /// Thrown when
+ /// is not equal to .
+ public static void AssertFailureMechanismAssemblyCategories(IEnumerable original,
+ IEnumerable actual)
+ {
+ Assert.AreEqual(original.Count(), actual.Count());
+
+ CollectionAssert.AreEqual(original.Select(o => GetFailureMechanismCategoryGroup(o.Category)), actual.Select(r => r.Group));
+ CollectionAssert.AreEqual(original.Select(o => o.LowerLimit), actual.Select(r => r.LowerBoundary));
+ CollectionAssert.AreEqual(original.Select(o => o.UpperLimit), actual.Select(r => r.UpperBoundary));
+ }
+
+ ///
+ /// Asserts whether is equal to .
+ ///
/// The original collection of .
/// The actual collection of .
/// Thrown when
@@ -94,6 +111,33 @@
}
}
+ private static FailureMechanismAssemblyCategoryGroup GetFailureMechanismCategoryGroup(EFailureMechanismCategory category)
+ {
+ switch (category)
+ {
+ case EFailureMechanismCategory.It:
+ return FailureMechanismAssemblyCategoryGroup.It;
+ case EFailureMechanismCategory.IIt:
+ return FailureMechanismAssemblyCategoryGroup.IIt;
+ case EFailureMechanismCategory.IIIt:
+ return FailureMechanismAssemblyCategoryGroup.IIIt;
+ case EFailureMechanismCategory.IVt:
+ return FailureMechanismAssemblyCategoryGroup.IVt;
+ case EFailureMechanismCategory.Vt:
+ return FailureMechanismAssemblyCategoryGroup.Vt;
+ case EFailureMechanismCategory.VIt:
+ return FailureMechanismAssemblyCategoryGroup.VIt;
+ case EFailureMechanismCategory.VIIt:
+ return FailureMechanismAssemblyCategoryGroup.VIIt;
+ case EFailureMechanismCategory.Nvt:
+ return FailureMechanismAssemblyCategoryGroup.NotApplicable;
+ case EFailureMechanismCategory.Gr:
+ return FailureMechanismAssemblyCategoryGroup.None;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+
private static FailureMechanismSectionAssemblyCategoryGroup GetFailureMechanismSectionCategoryGroup(EFmSectionCategory category)
{
switch (category)