Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyResult.cs =================================================================== diff -u -r111389fe846f8be2ce089db8e4809512b0be52a8 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyResult.cs (.../ExportableFailureMechanismSectionAssemblyResult.cs) (revision 111389fe846f8be2ce089db8e4809512b0be52a8) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyResult.cs (.../ExportableFailureMechanismSectionAssemblyResult.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -36,14 +36,18 @@ /// /// The id of the failure mechanism section assembly result. /// The failure mechanism section. + /// The probability of this section. /// The assembly group of this section. /// The method used to assemble the assembly group for this section. + /// The method used to assemble the probability for this section. /// Thrown when is null. /// Thrown when is invalid. - public ExportableFailureMechanismSectionAssemblyResult(string id, + public ExportableFailureMechanismSectionAssemblyResult(string id, ExportableFailureMechanismSection failureMechanismSection, + double probability, FailureMechanismSectionAssemblyGroup assemblyGroup, - ExportableAssemblyMethod assemblyGroupAssemblyMethod) + ExportableAssemblyMethod assemblyGroupAssemblyMethod, + ExportableAssemblyMethod probabilityAssemblyMethod) { IdValidationHelper.ThrowIfInvalid(id); @@ -54,8 +58,10 @@ Id = id; FailureMechanismSection = failureMechanismSection; + Probability = probability; AssemblyGroup = assemblyGroup; AssemblyGroupAssemblyMethod = assemblyGroupAssemblyMethod; + ProbabilityAssemblyMethod = probabilityAssemblyMethod; } /// @@ -77,5 +83,15 @@ /// Gets the method that was used to assemble the assembly group for this section. /// public ExportableAssemblyMethod AssemblyGroupAssemblyMethod { get; } + + /// + /// Gets the probability of this section. + /// + public double Probability { get; } + + /// + /// Gets the method used to assemble the probability for this section. + /// + public ExportableAssemblyMethod ProbabilityAssemblyMethod { get; } } } \ No newline at end of file Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyWithProbabilityResult.cs =================================================================== diff -u -r1267614afc8c93fd6c07358bbe9d2aa22464b1a7 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyWithProbabilityResult.cs (.../ExportableFailureMechanismSectionAssemblyWithProbabilityResult.cs) (revision 1267614afc8c93fd6c07358bbe9d2aa22464b1a7) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.IO/Model/ExportableFailureMechanismSectionAssemblyWithProbabilityResult.cs (.../ExportableFailureMechanismSectionAssemblyWithProbabilityResult.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -47,20 +47,6 @@ double probability, ExportableAssemblyMethod assemblyGroupAssemblyMethod, ExportableAssemblyMethod probabilityAssemblyMethod) - : base(id, failureMechanismSection, assemblyGroup, assemblyGroupAssemblyMethod) - { - Probability = probability; - ProbabilityAssemblyMethod = probabilityAssemblyMethod; - } - - /// - /// Gets the probability of this section. - /// - public double Probability { get; } - - /// - /// Gets the method used to assemble the probability for this section. - /// - public ExportableAssemblyMethod ProbabilityAssemblyMethod { get; } + : base(id, failureMechanismSection, probability, assemblyGroup, assemblyGroupAssemblyMethod, probabilityAssemblyMethod) {} } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/AssemblyGmlWriterTest.cs =================================================================== diff -u -rd226a725b8d8cff126a9332f32431594bf140a05 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/AssemblyGmlWriterTest.cs (.../AssemblyGmlWriterTest.cs) (revision d226a725b8d8cff126a9332f32431594bf140a05) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/AssemblyGmlWriterTest.cs (.../AssemblyGmlWriterTest.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -184,8 +184,8 @@ }, new[] { new ExportableCombinedSectionAssembly(combinedSection, new ExportableFailureMechanismSectionAssemblyResult( - "resultaat_gecombineerd_1", combinedSection, - FailureMechanismSectionAssemblyGroup.I, ExportableAssemblyMethod.BOI3C1), + "resultaat_gecombineerd_1", combinedSection, 0.37, + FailureMechanismSectionAssemblyGroup.I, ExportableAssemblyMethod.BOI3C1, ExportableAssemblyMethod.Manual), new[] { new ExportableFailureMechanismCombinedSectionAssemblyResult( Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/Model/ExportableFailureMechanismSectionAssemblyResultTest.cs =================================================================== diff -u -r111389fe846f8be2ce089db8e4809512b0be52a8 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/Model/ExportableFailureMechanismSectionAssemblyResultTest.cs (.../ExportableFailureMechanismSectionAssemblyResultTest.cs) (revision 111389fe846f8be2ce089db8e4809512b0be52a8) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.Test/Model/ExportableFailureMechanismSectionAssemblyResultTest.cs (.../ExportableFailureMechanismSectionAssemblyResultTest.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -41,7 +41,9 @@ ExportableFailureMechanismSection section = ExportableFailureMechanismSectionTestFactory.CreateExportableFailureMechanismSection(); // Call - void Call() => new ExportableFailureMechanismSectionAssemblyResult(invalidId, section, random.NextEnumValue(), + void Call() => new ExportableFailureMechanismSectionAssemblyResult(invalidId, section, random.NextDouble(), + random.NextEnumValue(), + random.NextEnumValue(), random.NextEnumValue()); // Assert @@ -56,7 +58,9 @@ var random = new Random(21); // Call - void Call() => new ExportableFailureMechanismSectionAssemblyResult("id", null, random.NextEnumValue(), + void Call() => new ExportableFailureMechanismSectionAssemblyResult("id", null, random.NextDouble(), + random.NextEnumValue(), + random.NextEnumValue(), random.NextEnumValue()); // Assert @@ -71,18 +75,22 @@ const string id = "id"; var random = new Random(21); + double probability = random.NextDouble(); ExportableFailureMechanismSection section = ExportableFailureMechanismSectionTestFactory.CreateExportableFailureMechanismSection(); var assemblyGroup = random.NextEnumValue(); var assemblyMethod = random.NextEnumValue(); + var probabilityAssemblyMethod = random.NextEnumValue(); // Call - var result = new ExportableFailureMechanismSectionAssemblyResult(id, section, assemblyGroup, assemblyMethod); + var result = new ExportableFailureMechanismSectionAssemblyResult(id, section, probability, assemblyGroup, assemblyMethod, probabilityAssemblyMethod); // Assert Assert.AreEqual(id, result.Id); Assert.AreSame(section, result.FailureMechanismSection); + Assert.AreEqual(probability, result.Probability); Assert.AreEqual(assemblyGroup, result.AssemblyGroup); Assert.AreEqual(assemblyMethod, result.AssemblyGroupAssemblyMethod); + Assert.AreEqual(probabilityAssemblyMethod, result.ProbabilityAssemblyMethod); } } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.TestUtil/ExportableFailureMechanismSectionAssemblyResultTestFactory.cs =================================================================== diff -u -r1267614afc8c93fd6c07358bbe9d2aa22464b1a7 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.TestUtil/ExportableFailureMechanismSectionAssemblyResultTestFactory.cs (.../ExportableFailureMechanismSectionAssemblyResultTestFactory.cs) (revision 1267614afc8c93fd6c07358bbe9d2aa22464b1a7) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.IO.TestUtil/ExportableFailureMechanismSectionAssemblyResultTestFactory.cs (.../ExportableFailureMechanismSectionAssemblyResultTestFactory.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -46,6 +46,7 @@ return new ExportableFailureMechanismSectionAssemblyResult( "id", section, + random.NextDouble(), random.NextEnumValue(new[] { FailureMechanismSectionAssemblyGroup.NotDominant, @@ -58,6 +59,7 @@ FailureMechanismSectionAssemblyGroup.IIIMin, FailureMechanismSectionAssemblyGroup.NotRelevant }), + random.NextEnumValue(), random.NextEnumValue()); } Index: Riskeer/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs =================================================================== diff -u -r111389fe846f8be2ce089db8e4809512b0be52a8 -rfaef9046b62f643860c2885dc4270fce2542a1e3 --- Riskeer/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs (.../ExportableCombinedSectionAssemblyFactory.cs) (revision 111389fe846f8be2ce089db8e4809512b0be52a8) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs (.../ExportableCombinedSectionAssemblyFactory.cs) (revision faef9046b62f643860c2885dc4270fce2542a1e3) @@ -71,7 +71,7 @@ var exportableSectionResult = new ExportableCombinedSectionAssembly( exportableSection, new ExportableFailureMechanismSectionAssemblyResult( - "id", exportableSection, assemblyResult.TotalResult, ExportableAssemblyMethodFactory.Create(assemblyResult.CombinedSectionResultAssemblyMethod)), + "id", exportableSection, 13.37, assemblyResult.TotalResult, ExportableAssemblyMethodFactory.Create(assemblyResult.CombinedSectionResultAssemblyMethod), ExportableAssemblyMethod.Manual), CreateFailureMechanismCombinedSectionAssemblyResults(assemblyResult, assessmentSection)); sectionResults.Add(exportableSectionResult);