Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs =================================================================== diff -u -rb50aa5c330d5c514ef0727cb9b732094c228eb46 -rc37e7aa9fdd38a0476335e056b33c583486ed1af --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision b50aa5c330d5c514ef0727cb9b732094c228eb46) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision c37e7aa9fdd38a0476335e056b33c583486ed1af) @@ -95,6 +95,7 @@ [XmlArrayItem(typeof(SerializableTotalAssemblyResult))] [XmlArrayItem(typeof(SerializableFailureMechanism))] [XmlArrayItem(typeof(SerializableFailureMechanismSectionAssembly))] + [XmlArrayItem(typeof(SerializableFailureMechanismSections))] public SerializableFeatureMember[] FeatureMembers { get; set; } } } \ No newline at end of file Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssessmentProcess.cs =================================================================== diff -u -r4370689b5b8ddbdcbec2c0632ca7cf4220851eac -rc37e7aa9fdd38a0476335e056b33c583486ed1af --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssessmentProcess.cs (.../SerializableAssessmentProcess.cs) (revision 4370689b5b8ddbdcbec2c0632ca7cf4220851eac) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssessmentProcess.cs (.../SerializableAssessmentProcess.cs) (revision c37e7aa9fdd38a0476335e056b33c583486ed1af) @@ -42,14 +42,12 @@ /// The assessment section this process belongs to. /// The starting year of the assessment process. /// The end year of the assessment process. - /// The description of the assessment process. /// Thrown when /// or is null. public SerializableAssessmentProcess(string id, SerializableAssessmentSection assessmentSection, int startYear, - int endYear, - string description = null) + int endYear) { if (id == null) { @@ -65,7 +63,6 @@ AssessmentSectionId = assessmentSection.Id; StartYear = startYear; EndYear = endYear; - Description = description; } /// @@ -91,11 +88,5 @@ /// [XmlElement(AssemblyXmlIdentifiers.EndYear)] public int EndYear { get; set; } - - /// - /// Gets or sets the description. - /// - [XmlElement(AssemblyXmlIdentifiers.Description)] - public string Description { get; set; } } } \ No newline at end of file Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs =================================================================== diff -u -rb50aa5c330d5c514ef0727cb9b732094c228eb46 -rc37e7aa9fdd38a0476335e056b33c583486ed1af --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs (.../SerializableAssemblyTest.cs) (revision b50aa5c330d5c514ef0727cb9b732094c228eb46) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssemblyTest.cs (.../SerializableAssemblyTest.cs) (revision c37e7aa9fdd38a0476335e056b33c583486ed1af) @@ -66,12 +66,13 @@ Assert.AreEqual("featureMember", xmlArrayAttribute.ElementName); IEnumerable xmlArrayItemAttributes = TypeUtils.GetPropertyAttributes(nameof(SerializableAssembly.FeatureMembers)); - Assert.AreEqual(5, xmlArrayItemAttributes.Count()); + Assert.AreEqual(6, xmlArrayItemAttributes.Count()); Assert.AreEqual(typeof(SerializableAssessmentProcess), xmlArrayItemAttributes.ElementAt(0).Type); Assert.AreEqual(typeof(SerializableAssessmentSection), xmlArrayItemAttributes.ElementAt(1).Type); Assert.AreEqual(typeof(SerializableTotalAssemblyResult), xmlArrayItemAttributes.ElementAt(2).Type); Assert.AreEqual(typeof(SerializableFailureMechanism), xmlArrayItemAttributes.ElementAt(3).Type); Assert.AreEqual(typeof(SerializableFailureMechanismSectionAssembly), xmlArrayItemAttributes.ElementAt(4).Type); + Assert.AreEqual(typeof(SerializableFailureMechanismSections), xmlArrayItemAttributes.ElementAt(5).Type); } [Test] @@ -211,6 +212,8 @@ SerializableAssemblyGroup.Group4, new SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethod.WBI1A1, SerializableFailureMechanismCategoryGroup.IIt)); + var sections1 = new SerializableFailureMechanismSections("sections1", failureMechanism1); + var result1 = new SerializableFailureMechanismSectionAssembly("sr1", failureMechanism1, new[] @@ -227,7 +230,8 @@ assessmentProcess, totalAssemblyResult, failureMechanism1, - result1 + result1, + sections1 }); serializer.Serialize(writer, assembly, xmlns); Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssessmentProcessTest.cs =================================================================== diff -u -r7f2399453f788c27181ea2b857a6cad170e78179 -rc37e7aa9fdd38a0476335e056b33c583486ed1af --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssessmentProcessTest.cs (.../SerializableAssessmentProcessTest.cs) (revision 7f2399453f788c27181ea2b857a6cad170e78179) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableAssessmentProcessTest.cs (.../SerializableAssessmentProcessTest.cs) (revision c37e7aa9fdd38a0476335e056b33c583486ed1af) @@ -40,7 +40,6 @@ Assert.IsInstanceOf(assessmentProcess); Assert.IsNull(assessmentProcess.Id); Assert.IsNull(assessmentProcess.AssessmentSectionId); - Assert.IsNull(assessmentProcess.Description); Assert.Zero(assessmentProcess.StartYear); Assert.Zero(assessmentProcess.EndYear); @@ -53,8 +52,6 @@ nameof(SerializableAssessmentProcess.StartYear), "beginJaarBeoordelingsronde"); SerializableAttributeTestHelper.AssertXmlElementAttribute( nameof(SerializableAssessmentProcess.EndYear), "eindJaarBeoordelingsronde"); - SerializableAttributeTestHelper.AssertXmlElementAttribute( - nameof(SerializableAssessmentProcess.Description), "omschrijving"); } [Test] @@ -96,7 +93,6 @@ { // Setup const string id = "section id"; - const string description = "process description"; var random = new Random(39); var assessmentSection = new SerializableAssessmentSection( @@ -115,15 +111,13 @@ var assessmentProcess = new SerializableAssessmentProcess(id, assessmentSection, startYear, - endYear, - description); + endYear); // Assert Assert.AreEqual(id, assessmentProcess.Id); Assert.AreEqual(assessmentSection.Id, assessmentProcess.AssessmentSectionId); Assert.AreEqual(startYear, assessmentProcess.StartYear); Assert.AreEqual(endYear, assessmentProcess.EndYear); - Assert.AreEqual(description, assessmentProcess.Description); } } } \ No newline at end of file Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableFailureMechanismSectionsTest.cs =================================================================== diff -u -rb0b566f39d1154e82c2cc098318ad18bf70342e8 -rc37e7aa9fdd38a0476335e056b33c583486ed1af --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableFailureMechanismSectionsTest.cs (.../SerializableFailureMechanismSectionsTest.cs) (revision b0b566f39d1154e82c2cc098318ad18bf70342e8) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.IO.Test/Model/SerializableFailureMechanismSectionsTest.cs (.../SerializableFailureMechanismSectionsTest.cs) (revision c37e7aa9fdd38a0476335e056b33c583486ed1af) @@ -20,8 +20,11 @@ // All rights reserved. using System; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.AssemblyTool.IO.Model; +using Ringtoets.AssemblyTool.IO.Model.DataTypes; +using Ringtoets.AssemblyTool.IO.Model.Enums; using Ringtoets.AssemblyTool.IO.TestUtil; namespace Ringtoets.AssemblyTool.IO.Test.Model @@ -76,15 +79,20 @@ // Setup const string id = "section id"; - var failureMechanism = new SerializableFailureMechanism(); + var random = new Random(39); + var failureMechanism = new SerializableFailureMechanism("fm id", + new SerializableTotalAssemblyResult(), + random.NextEnumValue(), + random.NextEnumValue(), + new SerializableFailureMechanismAssemblyResult()); // Call var sections = new SerializableFailureMechanismSections(id, failureMechanism); // Assert Assert.AreEqual(id, sections.Id); - Assert.AreEqual(failureMechanism.Id, failureMechanism.Id); + Assert.AreEqual(failureMechanism.Id, sections.FailureMechanismId); } } } \ No newline at end of file