Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/DataTypes/SerializableFailureMechanismAssemblyResult.cs =================================================================== diff -u -r3c6655d802e8c8a7f1b3fec37e96778fedb3f278 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/DataTypes/SerializableFailureMechanismAssemblyResult.cs (.../SerializableFailureMechanismAssemblyResult.cs) (revision 3c6655d802e8c8a7f1b3fec37e96778fedb3f278) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/DataTypes/SerializableFailureMechanismAssemblyResult.cs (.../SerializableFailureMechanismAssemblyResult.cs) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -43,7 +43,7 @@ /// The method used to assemble this result. /// The category group of this assembly result. /// The probability of this assembly result. - public SerializableFailureMechanismAssemblyResult(AssemblyMethod assemblyMethod, + public SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethod assemblyMethod, SerializableFailureMechanismCategoryGroup categoryGroup, double? probability = null) : this() { @@ -56,7 +56,7 @@ /// Gets or sets the name of the method used to assemble this result. /// [XmlElement(AssemblyXmlIdentifiers.AssemblyMethod)] - public AssemblyMethod AssemblyMethod { get; set; } + public SerializableAssemblyMethod AssemblyMethod { get; set; } /// /// Gets or sets the category group of this assembly result. Fisheye: Tag 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyMethod.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs =================================================================== diff -u -r245fc0e0843e3ac3694436d2a9cef6504c308559 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs (.../AssemblyXmlEnumIdentifiers.cs) (revision 245fc0e0843e3ac3694436d2a9cef6504c308559) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/AssemblyXmlEnumIdentifiers.cs (.../AssemblyXmlEnumIdentifiers.cs) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -74,112 +74,112 @@ #region AssemblyMethod /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0E1 = "WBI-0E-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0E3 = "WBI-0E-3"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0G1 = "WBI-0G-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0G3 = "WBI-0G-3"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0G4 = "WBI-0G-4"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0G5 = "WBI-0G-5"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0G6 = "WBI-0G-6"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T1 = "WBI-0T-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T3 = "WBI-0T-3"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T4 = "WBI-0T-4"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T5 = "WBI-0T-5"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T6 = "WBI-0T-6"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0T7 = "WBI-0T-7"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI0A1 = "WBI-0A-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI1A1 = "WBI-1A-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI1B1 = "WBI-1B-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI2A1 = "WBI-2A-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI2B1 = "WBI-2B-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI2C1 = "WBI-2C-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI3A1 = "WBI-3A-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI3B1 = "WBI-3B-1"; /// - /// Identifier for + /// Identifier for /// public const string AssemblyMethodWBI3C1 = "WBI-3C-1"; Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableAssemblyMethod.cs =================================================================== diff -u --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableAssemblyMethod.cs (revision 0) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/Enums/SerializableAssemblyMethod.cs (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -0,0 +1,163 @@ +// 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 +{ + /// + /// Serializable enum defining the various types of assembly methods. + /// + public enum SerializableAssemblyMethod + { + /// + /// Represents the assembly method WBI-0E-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0E1)] + WBI0E1 = 1, + + /// + /// Represents the assembly method WBI-0E-3. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0E3)] + WBI0E3 = 2, + + /// + /// Represents the assembly method WBI-0G-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0G1)] + WBI0G1 = 3, + + /// + /// Represents the assembly method WBI-0G-3. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0G3)] + WBI0G3 = 4, + + /// + /// Represents the assembly method WBI-0G-4. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0G4)] + WBI0G4 = 5, + + /// + /// Represents the assembly method WBI-0G-5. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0G5)] + WBI0G5 = 6, + + /// + /// Represents the assembly method WBI-0G-6. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0G6)] + WBI0G6 = 7, + + /// + /// Represents the assembly method WBI-0T-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T1)] + WBI0T1 = 8, + + /// + /// Represents the assembly method WBI-0T-3. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T3)] + WBI0T3 = 9, + + /// + /// Represents the assembly method WBI-0T-4. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T4)] + WBI0T4 = 10, + + /// + /// Represents the assembly method WBI-0T-5. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T5)] + WBI0T5 = 11, + + /// + /// Represents the assembly method WBI-0T-6. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T6)] + WBI0T6 = 12, + + /// + /// Represents the assembly method WBI-0T-7. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0T7)] + WBI0T7 = 13, + + /// + /// Represents the assembly method WBI-0A-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI0A1)] + WBI0A1 = 14, + + /// + /// Represents the assembly method WBI-1A-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI1A1)] + WBI1A1 = 15, + + /// + /// Represents the assembly method WBI-1B-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI1B1)] + WBI1B1 = 16, + + /// + /// Represents the assembly method WBI-2A-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI2A1)] + WBI2A1 = 17, + + /// + /// Represents the assembly method WBI-2B-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI2B1)] + WBI2B1 = 18, + + /// + /// Represents the assembly method WBI-2C-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI2C1)] + WBI2C1 = 19, + + /// + /// Represents the assembly method WBI-3A-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI3A1)] + WBI3A1 = 20, + + /// + /// Represents the assembly method WBI-3B-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI3B1)] + WBI3B1 = 21, + + /// + /// Represents the assembly method WBI-3C-1. + /// + [XmlEnum(AssemblyXmlEnumIdentifiers.AssemblyMethodWBI3C1)] + WBI3C1 = 22 + } +} \ No newline at end of file Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj =================================================================== diff -u -r625cf3d63b43ca2bdd3743c22b4a3df9676047d0 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj (.../Ringtoets.AssemblyTool.IO.csproj) (revision 625cf3d63b43ca2bdd3743c22b4a3df9676047d0) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Ringtoets.AssemblyTool.IO.csproj (.../Ringtoets.AssemblyTool.IO.csproj) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -19,7 +19,7 @@ - + Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/DataTypes/SerializableFailureMechanismAssemblyResultTest.cs =================================================================== diff -u -r3c6655d802e8c8a7f1b3fec37e96778fedb3f278 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/DataTypes/SerializableFailureMechanismAssemblyResultTest.cs (.../SerializableFailureMechanismAssemblyResultTest.cs) (revision 3c6655d802e8c8a7f1b3fec37e96778fedb3f278) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/DataTypes/SerializableFailureMechanismAssemblyResultTest.cs (.../SerializableFailureMechanismAssemblyResultTest.cs) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -38,7 +38,7 @@ var assemblyResult = new SerializableFailureMechanismAssemblyResult(); // Assert - Assert.AreEqual((AssemblyMethod) 0, assemblyResult.AssemblyMethod); + Assert.AreEqual((SerializableAssemblyMethod) 0, assemblyResult.AssemblyMethod); Assert.AreEqual((SerializableFailureMechanismCategoryGroup) 0, assemblyResult.CategoryGroup); Assert.IsNull(assemblyResult.Probability); Assert.AreEqual("VOLLDG", assemblyResult.Status); @@ -59,7 +59,7 @@ // Setup var random = new Random(39); var category = random.NextEnumValue(); - var assemblyMethod = random.NextEnumValue(); + var assemblyMethod = random.NextEnumValue(); double probability = random.NextDouble(); // Call @@ -79,7 +79,7 @@ // Setup var random = new Random(39); var assemblyResult = new SerializableFailureMechanismAssemblyResult( - random.NextEnumValue(), + random.NextEnumValue(), random.NextEnumValue(), probability); Fisheye: Tag 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/AssemblyMethodTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableAssemblyMethodTest.cs =================================================================== diff -u --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableAssemblyMethodTest.cs (revision 0) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/Enums/SerializableAssemblyMethodTest.cs (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -0,0 +1,184 @@ +// 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 SerializableAssemblyMethodTest : EnumWithXmlEnumNameTestFixture + { + protected override IDictionary ExpectedValueForEnumValues + { + get + { + return new Dictionary + { + { + SerializableAssemblyMethod.WBI0E1, 1 + }, + { + SerializableAssemblyMethod.WBI0E3, 2 + }, + { + SerializableAssemblyMethod.WBI0G1, 3 + }, + { + SerializableAssemblyMethod.WBI0G3, 4 + }, + { + SerializableAssemblyMethod.WBI0G4, 5 + }, + { + SerializableAssemblyMethod.WBI0G5, 6 + }, + { + SerializableAssemblyMethod.WBI0G6, 7 + }, + { + SerializableAssemblyMethod.WBI0T1, 8 + }, + { + SerializableAssemblyMethod.WBI0T3, 9 + }, + { + SerializableAssemblyMethod.WBI0T4, 10 + }, + { + SerializableAssemblyMethod.WBI0T5, 11 + }, + { + SerializableAssemblyMethod.WBI0T6, 12 + }, + { + SerializableAssemblyMethod.WBI0T7, 13 + }, + { + SerializableAssemblyMethod.WBI0A1, 14 + }, + { + SerializableAssemblyMethod.WBI1A1, 15 + }, + { + SerializableAssemblyMethod.WBI1B1, 16 + }, + { + SerializableAssemblyMethod.WBI2A1, 17 + }, + { + SerializableAssemblyMethod.WBI2B1, 18 + }, + { + SerializableAssemblyMethod.WBI2C1, 19 + }, + { + SerializableAssemblyMethod.WBI3A1, 20 + }, + { + SerializableAssemblyMethod.WBI3B1, 21 + }, + { + SerializableAssemblyMethod.WBI3C1, 22 + } + }; + } + } + + protected override IDictionary ExpectedDisplayNameForEnumValues + { + get + { + return new Dictionary + { + { + SerializableAssemblyMethod.WBI0E1, "WBI-0E-1" + }, + { + SerializableAssemblyMethod.WBI0E3, "WBI-0E-3" + }, + { + SerializableAssemblyMethod.WBI0G1, "WBI-0G-1" + }, + { + SerializableAssemblyMethod.WBI0G3, "WBI-0G-3" + }, + { + SerializableAssemblyMethod.WBI0G4, "WBI-0G-4" + }, + { + SerializableAssemblyMethod.WBI0G5, "WBI-0G-5" + }, + { + SerializableAssemblyMethod.WBI0G6, "WBI-0G-6" + }, + { + SerializableAssemblyMethod.WBI0T1, "WBI-0T-1" + }, + { + SerializableAssemblyMethod.WBI0T3, "WBI-0T-3" + }, + { + SerializableAssemblyMethod.WBI0T4, "WBI-0T-4" + }, + { + SerializableAssemblyMethod.WBI0T5, "WBI-0T-5" + }, + { + SerializableAssemblyMethod.WBI0T6, "WBI-0T-6" + }, + { + SerializableAssemblyMethod.WBI0T7, "WBI-0T-7" + }, + { + SerializableAssemblyMethod.WBI0A1, "WBI-0A-1" + }, + { + SerializableAssemblyMethod.WBI1A1, "WBI-1A-1" + }, + { + SerializableAssemblyMethod.WBI1B1, "WBI-1B-1" + }, + { + SerializableAssemblyMethod.WBI2A1, "WBI-2A-1" + }, + { + SerializableAssemblyMethod.WBI2B1, "WBI-2B-1" + }, + { + SerializableAssemblyMethod.WBI2C1, "WBI-2C-1" + }, + { + SerializableAssemblyMethod.WBI3A1, "WBI-3A-1" + }, + { + SerializableAssemblyMethod.WBI3B1, "WBI-3B-1" + }, + { + SerializableAssemblyMethod.WBI3C1, "WBI-3C-1" + } + }; + } + } + } +} \ No newline at end of file Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs =================================================================== diff -u -r625cf3d63b43ca2bdd3743c22b4a3df9676047d0 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs (.../SerializableAssemblyTest.cs) (revision 625cf3d63b43ca2bdd3743c22b4a3df9676047d0) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs (.../SerializableAssemblyTest.cs) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -200,8 +200,8 @@ var totalAssemblyResult = new SerializableTotalAssemblyResult( "total id", assessmentProcess, - new SerializableFailureMechanismAssemblyResult(AssemblyMethod.WBI2B1, SerializableFailureMechanismCategoryGroup.IIt), - new SerializableFailureMechanismAssemblyResult(AssemblyMethod.WBI3C1, SerializableFailureMechanismCategoryGroup.NotApplicable, 0.000124)); + new SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethod.WBI2B1, SerializableFailureMechanismCategoryGroup.IIt), + new SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethod.WBI3C1, SerializableFailureMechanismCategoryGroup.NotApplicable, 0.000124)); var assembly = new SerializableAssembly("assembly_1", new Point2D(12.0, 34.0), new Point2D(56.053, 78.0002345), new List Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj =================================================================== diff -u -r625cf3d63b43ca2bdd3743c22b4a3df9676047d0 -r0e5eeff9dd34c55950c342eb0c6a36d817fc1cff --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj (.../Ringtoets.AssemblyTool.IO.Test.csproj) (revision 625cf3d63b43ca2bdd3743c22b4a3df9676047d0) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Ringtoets.AssemblyTool.IO.Test.csproj (.../Ringtoets.AssemblyTool.IO.Test.csproj) (revision 0e5eeff9dd34c55950c342eb0c6a36d817fc1cff) @@ -17,7 +17,7 @@ - +