Index: Riskeer/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs =================================================================== diff -u -r94da57aae6e9a2199d2bfbb04fa20675f34bff46 -rcb6d0b59e41fc47b00dd2759b76453d295d6c5fa --- Riskeer/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs (.../ExportableFailureMechanism.cs) (revision 94da57aae6e9a2199d2bfbb04fa20675f34bff46) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs (.../ExportableFailureMechanism.cs) (revision cb6d0b59e41fc47b00dd2759b76453d295d6c5fa) @@ -36,7 +36,7 @@ /// The assembly results for the failure mechanism sections. /// The type of the failure mechanism. /// The code of the failure mechanism. - /// Thrown when , + /// Thrown when /// or is null. public ExportableFailureMechanism(ExportableFailureMechanismAssemblyResult failureMechanismAssembly, IEnumerable sectionAssemblyResults, Index: Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs =================================================================== diff -u -rb05dd6a7d44e624aa00510c09a7894cf7d1a593f -rcb6d0b59e41fc47b00dd2759b76453d295d6c5fa --- Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs (.../AssemblyExporter.cs) (revision b05dd6a7d44e624aa00510c09a7894cf7d1a593f) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs (.../AssemblyExporter.cs) (revision cb6d0b59e41fc47b00dd2759b76453d295d6c5fa) @@ -74,7 +74,7 @@ } ExportableAssessmentSection exportableAssessmentSection = CreateExportableAssessmentSection(); - if (!ValidateExportableAssessmentSection(exportableAssessmentSection)) + if (exportableAssessmentSection == null) { LogErrorMessage(); return false; @@ -119,11 +119,6 @@ } } - private static bool ValidateExportableAssessmentSection(ExportableAssessmentSection exportableAssessmentSection) - { - return exportableAssessmentSection != null; - } - private static void LogErrorMessage() { log.Error(Resources.AssemblyExporter_LogErrorMessage_No_AssemblyResult_exported_Check_FailureMechanism_results_for_details); Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableAssessmentSectionTest.cs =================================================================== diff -u -r73a029ff60e9fc9121505cbd979718b9926cf9b7 -rcb6d0b59e41fc47b00dd2759b76453d295d6c5fa --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableAssessmentSectionTest.cs (.../ExportableAssessmentSectionTest.cs) (revision 73a029ff60e9fc9121505cbd979718b9926cf9b7) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableAssessmentSectionTest.cs (.../ExportableAssessmentSectionTest.cs) (revision cb6d0b59e41fc47b00dd2759b76453d295d6c5fa) @@ -47,7 +47,7 @@ } [Test] - public void Constructor_InvalidId_ThrowsArgumentNullException() + public void Constructor_IdNull_ThrowsArgumentNullException() { // Call void Call() => new ExportableAssessmentSection(string.Empty, null, Enumerable.Empty(), Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableFailureMechanismSectionAssemblyWithProbabilityResultTest.cs =================================================================== diff -u -r8a09d1b08bc5330769c3c2a74aa7cbfcf0e47890 -rcb6d0b59e41fc47b00dd2759b76453d295d6c5fa --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableFailureMechanismSectionAssemblyWithProbabilityResultTest.cs (.../ExportableFailureMechanismSectionAssemblyWithProbabilityResultTest.cs) (revision 8a09d1b08bc5330769c3c2a74aa7cbfcf0e47890) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Assembly/ExportableFailureMechanismSectionAssemblyWithProbabilityResultTest.cs (.../ExportableFailureMechanismSectionAssemblyWithProbabilityResultTest.cs) (revision cb6d0b59e41fc47b00dd2759b76453d295d6c5fa) @@ -37,18 +37,21 @@ { // Setup var random = new Random(21); - double probability = random.NextDouble(); + var section = new ExportableFailureMechanismSection(Enumerable.Empty(), random.NextDouble(), random.NextDouble()); + var assemblyGroup = random.NextEnumValue(); var assemblyMethod = random.NextEnumValue(); + double probability = random.NextDouble(); // Call var result = new ExportableFailureMechanismSectionAssemblyWithProbabilityResult( - new ExportableFailureMechanismSection(Enumerable.Empty(), random.NextDouble(), random.NextDouble()), - random.NextEnumValue(), probability, assemblyMethod); + section, assemblyGroup, probability, assemblyMethod); // Assert Assert.IsInstanceOf(result); - Assert.AreEqual(probability, result.Probability); + Assert.AreSame(section, result.FailureMechanismSection); + Assert.AreEqual(assemblyGroup, result.AssemblyGroup); Assert.AreEqual(assemblyMethod, result.AssemblyMethod); + Assert.AreEqual(probability, result.Probability); } } } \ No newline at end of file