Index: Core/Common/test/Core.Common.TestUtil/Core.Common.TestUtil.csproj
===================================================================
diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6
--- Core/Common/test/Core.Common.TestUtil/Core.Common.TestUtil.csproj (.../Core.Common.TestUtil.csproj) (revision ac96d7c315129af851634ed5a4a6800b59ede718)
+++ Core/Common/test/Core.Common.TestUtil/Core.Common.TestUtil.csproj (.../Core.Common.TestUtil.csproj) (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -25,6 +25,7 @@
+
@@ -35,6 +36,7 @@
+
Index: Core/Common/test/Core.Common.TestUtil/EnumWithXmlEnumNameTestFixture.cs
===================================================================
diff -u
--- Core/Common/test/Core.Common.TestUtil/EnumWithXmlEnumNameTestFixture.cs (revision 0)
+++ Core/Common/test/Core.Common.TestUtil/EnumWithXmlEnumNameTestFixture.cs (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -0,0 +1,63 @@
+// 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 Lesser 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 Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser 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.Reflection;
+using System.Xml.Serialization;
+using NUnit.Framework;
+
+namespace Core.Common.TestUtil
+{
+ [TestFixture]
+ public abstract class EnumWithXmlEnumNameTestFixture : EnumValuesTestFixture
+ {
+ protected abstract IDictionary ExpectedDisplayNameForEnumValues { get; }
+
+ [Test]
+ public void DisplayName_Always_ReturnExpectedValues()
+ {
+ // Setup
+ foreach (TEnum value in Enum.GetValues(typeof(TEnum)))
+ {
+ // Call
+ string displayName = GetDisplayName(value);
+
+ // Assert
+ Assert.AreEqual(ExpectedDisplayNameForEnumValues[value], displayName,
+ $"XML Display name for {value} incorrect.");
+ }
+ }
+
+ private static string GetDisplayName(TEnum value)
+ {
+ Type type = typeof(TEnum);
+ MemberInfo[] memInfo = type.GetMember(value.ToString());
+ object[] attributes = memInfo[0].GetCustomAttributes(typeof(XmlEnumAttribute), false);
+ if (attributes.Length > 0)
+ {
+ return ((XmlEnumAttribute) attributes[0]).Name;
+ }
+
+ return null;
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6 refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/DataTypes/SerializableAssessmentSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs
===================================================================
diff -u
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs (revision 0)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -0,0 +1,74 @@
+// 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.AssemblyTool.IO.Model.Enums
+{
+ ///
+ /// Class containing definitions for XML enum identifiers for
+ /// the serializable assembly model.
+ ///
+ public static class AssemblyXmlEnumIdentifiers
+ {
+ #region SerializableFailureMechanismCategoryGroup
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupNotApplicable = "NVT";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupIt = "I-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupIIt = "II-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupIIIt = "III-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupIVt = "IV-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupVt = "V-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupVIt = "VI-traject";
+
+ ///
+ /// Identifier for
+ ///
+ public const string SerializableFailureMechanismCategoryGroupVIIt = "VII-traject";
+
+ #endregion
+ }
+}
\ No newline at end of file
Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableFailureMechanismCategoryGroup.cs
===================================================================
diff -u
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableFailureMechanismCategoryGroup.cs (revision 0)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableFailureMechanismCategoryGroup.cs (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -0,0 +1,79 @@
+// 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.Xml.Serialization;
+
+namespace Ringtoets.AssemblyTool.IO.Model.Enums
+{
+ ///
+ /// Enum defining the serializable assembly categories for a failure mechanism.
+ ///
+ public enum SerializableFailureMechanismCategoryGroup
+ {
+ ///
+ /// Represents the assembly category NVT (Not applicable) for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupNotApplicable)]
+ NotApplicable = 1,
+
+ ///
+ /// Represents the assembly category It for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIt)]
+ It = 2,
+
+ ///
+ /// Represents the assembly category IIt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIIt)]
+ IIt = 3,
+
+ ///
+ /// Represents the assembly category IIIt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIIIt)]
+ IIIt = 4,
+
+ ///
+ /// Represents the assembly category IVt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIVt)]
+ IVt = 5,
+
+ ///
+ /// Represents the assembly category Vt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVt)]
+ Vt = 6,
+
+ ///
+ /// Represents the assembly category VIt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVIt)]
+ VIt = 7,
+
+ ///
+ /// Represents the assembly category VIIt for a failure mechanism.
+ ///
+ [XmlEnum(AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVIIt)]
+ VIIt = 8
+ }
+}
\ No newline at end of file
Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj
===================================================================
diff -u -r5c017678f919eba8f9459dfd3e57410fe6c95edd -r916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj (.../Ringtoets.AssemblyTool.IO.csproj) (revision 5c017678f919eba8f9459dfd3e57410fe6c95edd)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj (.../Ringtoets.AssemblyTool.IO.csproj) (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -18,6 +18,8 @@
+
+
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/AssemblyXmlEnumIdentifiersTest.cs
===================================================================
diff -u
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/AssemblyXmlEnumIdentifiersTest.cs (revision 0)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/AssemblyXmlEnumIdentifiersTest.cs (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -0,0 +1,43 @@
+// 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.IO.Model.Enums;
+
+namespace Ringtoets.AssemblyTool.IO.Test.Model.Enums
+{
+ [TestFixture]
+ public class AssemblyXmlEnumIdentifiersTest
+ {
+ [Test]
+ public void AssemblyXmlEnumIdentifiers_ExpectedValues()
+ {
+ Assert.AreEqual("NVT", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupNotApplicable);
+ Assert.AreEqual("I-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIt);
+ Assert.AreEqual("II-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIIt);
+ Assert.AreEqual("III-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIIIt);
+ Assert.AreEqual("IV-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupIVt);
+ Assert.AreEqual("V-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVt);
+ Assert.AreEqual("VI-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVIt);
+ Assert.AreEqual("VII-traject", AssemblyXmlEnumIdentifiers.SerializableFailureMechanismCategoryGroupVIIt);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableFailureMechanismCategoryGroupTest.cs
===================================================================
diff -u
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableFailureMechanismCategoryGroupTest.cs (revision 0)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableFailureMechanismCategoryGroupTest.cs (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -0,0 +1,100 @@
+// 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.AssemblyTool.IO.Model.Enums;
+
+namespace Ringtoets.AssemblyTool.IO.Test.Model.Enums
+{
+ [TestFixture]
+ public class SerializableFailureMechanismCategoryGroupTest : EnumWithXmlEnumNameTestFixture
+ {
+ protected override IDictionary ExpectedValueForEnumValues
+ {
+ get
+ {
+ return new Dictionary
+ {
+ {
+ SerializableFailureMechanismCategoryGroup.NotApplicable, 1
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.It, 2
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IIt, 3
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IIIt, 4
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IVt, 5
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.Vt, 6
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.VIt, 7
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.VIIt, 8
+ }
+ };
+ }
+ }
+
+ protected override IDictionary ExpectedDisplayNameForEnumValues
+ {
+ get
+ {
+ return new Dictionary
+ {
+ {
+ SerializableFailureMechanismCategoryGroup.NotApplicable, "NVT"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.It, "I-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IIt, "II-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IIIt, "III-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.IVt, "IV-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.Vt, "V-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.VIt, "VI-traject"
+ },
+ {
+ SerializableFailureMechanismCategoryGroup.VIIt, "VII-traject"
+ }
+ };
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj
===================================================================
diff -u -r5c017678f919eba8f9459dfd3e57410fe6c95edd -r916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj (.../Ringtoets.AssemblyTool.IO.Test.csproj) (revision 5c017678f919eba8f9459dfd3e57410fe6c95edd)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj (.../Ringtoets.AssemblyTool.IO.Test.csproj) (revision 916d9bb347b0443e49f3e5c6e7d75b7c7f8c5ee6)
@@ -15,6 +15,8 @@
+
+