Fisheye: Tag ffec70662c33e5a611430ae73fa4d8cef5cdf147 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/CombinedFailureMechanismSectionAssembly.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/CombinedFailureMechanismSectionAssemblyOld.cs =================================================================== diff -u --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/CombinedFailureMechanismSectionAssemblyOld.cs (revision 0) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.Data/CombinedFailureMechanismSectionAssemblyOld.cs (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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; +using System.Collections.Generic; + +namespace Riskeer.AssemblyTool.Data +{ + /// + /// Assembly for the combined failure mechanism section. + /// + public class CombinedFailureMechanismSectionAssemblyOld + { + /// + /// Creates a new instance of . + /// + /// The section of the assembly. + /// The assembly results per failure mechanism. + /// Thrown when any parameter is null. + public CombinedFailureMechanismSectionAssemblyOld(CombinedAssemblyFailureMechanismSection section, + IEnumerable failureMechanismResults) + { + if (section == null) + { + throw new ArgumentNullException(nameof(section)); + } + + if (failureMechanismResults == null) + { + throw new ArgumentNullException(nameof(failureMechanismResults)); + } + + Section = section; + FailureMechanismResults = failureMechanismResults; + } + + /// + /// Gets the section of the assembly. + /// + public CombinedAssemblyFailureMechanismSection Section { get; } + + /// + /// Gets the assembly results per failure mechanism. + /// + public IEnumerable FailureMechanismResults { get; } + } +} \ No newline at end of file Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs =================================================================== diff -u -re27da81458ec24f65847f2232bf0f0fc99af0f17 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs (.../AssessmentSectionAssemblyCalculator.cs) (revision e27da81458ec24f65847f2232bf0f0fc99af0f17) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs (.../AssessmentSectionAssemblyCalculator.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -48,10 +48,10 @@ this.factory = factory; } - public IEnumerable AssembleCombinedFailureMechanismSections( + public IEnumerable AssembleCombinedFailureMechanismSections( IEnumerable> input, double assessmentSectionLength) { - return new List(); + return new List(); } } } \ No newline at end of file Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs =================================================================== diff -u -r6c60ef8aa494a4e0ff4a77657a751478162efceb -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs (.../AssessmentSectionAssemblyCalculatorOld.cs) (revision 6c60ef8aa494a4e0ff4a77657a751478162efceb) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOld.cs (.../AssessmentSectionAssemblyCalculatorOld.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -126,15 +126,15 @@ } } - public IEnumerable AssembleCombinedFailureMechanismSections( + public IEnumerable AssembleCombinedFailureMechanismSections( IEnumerable> input, double assessmentSectionLength) { try { ICommonFailureMechanismSectionAssembler kernel = factory.CreateCombinedFailureMechanismSectionAssemblyKernel(); AssemblyResult output = kernel.AssembleCommonFailureMechanismSections(FailureMechanismSectionListCreator.Create(input), assessmentSectionLength, false); - return CombinedFailureMechanismSectionAssemblyCreator.Create(output); + return CombinedFailureMechanismSectionAssemblyCreatorOld.Create(output); } catch (AssemblyException e) { Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs =================================================================== diff -u -re27da81458ec24f65847f2232bf0f0fc99af0f17 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision e27da81458ec24f65847f2232bf0f0fc99af0f17) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -34,10 +34,10 @@ /// /// The collection of failure mechanism section collections to assemble for. /// The length of the assessment section. - /// A collection of . + /// A collection of . /// Thrown when /// an error occurs while assembling. - IEnumerable AssembleCombinedFailureMechanismSections( + IEnumerable AssembleCombinedFailureMechanismSections( IEnumerable> input, double assessmentSectionLength); } } \ No newline at end of file Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculatorOld.cs =================================================================== diff -u -r6c60ef8aa494a4e0ff4a77657a751478162efceb -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculatorOld.cs (.../IAssessmentSectionAssemblyCalculatorOld.cs) (revision 6c60ef8aa494a4e0ff4a77657a751478162efceb) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculatorOld.cs (.../IAssessmentSectionAssemblyCalculatorOld.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -73,10 +73,10 @@ /// /// The collection of failure mechanism section collections to assemble for. /// The length of the assessment section. - /// A collection of . + /// A collection of . /// Thrown when /// an error occurs while assembling. - IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, + IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, double assessmentSectionLength); } } \ No newline at end of file Fisheye: Tag ffec70662c33e5a611430ae73fa4d8cef5cdf147 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/CombinedFailureMechanismSectionAssemblyCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/CombinedFailureMechanismSectionAssemblyCreatorOld.cs =================================================================== diff -u --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/CombinedFailureMechanismSectionAssemblyCreatorOld.cs (revision 0) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/CombinedFailureMechanismSectionAssemblyCreatorOld.cs (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -0,0 +1,76 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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; +using System.Collections.Generic; +using System.Linq; +using Assembly.Kernel.Old.Model; +using Riskeer.AssemblyTool.Data; + +namespace Riskeer.AssemblyTool.KernelWrapper.Creators +{ + /// + /// Creates instances. + /// + internal static class CombinedFailureMechanismSectionAssemblyCreatorOld + { + /// + /// Creates a collection of + /// based on the . + /// + /// The to create the + /// for. + /// A collection of . + /// Thrown when + /// is null. + public static IEnumerable Create(AssemblyResult result) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + var sectionAssemblies = new List(); + + for (var i = 0; i < result.CombinedSectionResult.Count(); i++) + { + FmSectionWithDirectCategory section = result.CombinedSectionResult.ElementAt(i); + sectionAssemblies.Add(new CombinedFailureMechanismSectionAssemblyOld( + CreateSection(section), + result.ResultPerFailureMechanism + .Select(failureMechanismSectionList => + (FmSectionWithDirectCategory) failureMechanismSectionList.Sections.ElementAt(i)) + .Select(element => + FailureMechanismSectionAssemblyCreatorOld.CreateFailureMechanismSectionAssemblyCategoryGroup( + element.Category)).ToArray())); + } + + return sectionAssemblies; + } + + private static CombinedAssemblyFailureMechanismSection CreateSection(FmSectionWithDirectCategory section) + { + return new CombinedAssemblyFailureMechanismSection( + section.SectionStart, section.SectionEnd, + FailureMechanismSectionAssemblyCreatorOld.CreateFailureMechanismSectionAssemblyCategoryGroup(section.Category)); + } + } +} \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/CombinedFailureMechanismSectionAssemblyOldTest.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/CombinedFailureMechanismSectionAssemblyOldTest.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/CombinedFailureMechanismSectionAssemblyOldTest.cs (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -0,0 +1,77 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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; +using System.Collections.Generic; +using System.Linq; +using Core.Common.TestUtil; +using NUnit.Framework; + +namespace Riskeer.AssemblyTool.Data.Test +{ + [TestFixture] + public class CombinedFailureMechanismSectionAssemblyOldTest + { + [Test] + public void Constructor_SectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new CombinedFailureMechanismSectionAssemblyOld(null, Enumerable.Empty()); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("section", exception.ParamName); + } + + [Test] + public void Constructor_FailureMechanismResultsNull_ThrowsArgumentNullException() + { + // Setup + var random = new Random(21); + var section = new CombinedAssemblyFailureMechanismSection(random.NextDouble(), random.NextDouble(), + random.NextEnumValue()); + + // Call + TestDelegate call = () => new CombinedFailureMechanismSectionAssemblyOld(section, null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("failureMechanismResults", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var random = new Random(21); + var section = new CombinedAssemblyFailureMechanismSection(random.NextDouble(), random.NextDouble(), + random.NextEnumValue()); + IEnumerable failureMechanismResults = Enumerable.Empty(); + + // Call + var assembly = new CombinedFailureMechanismSectionAssemblyOld(section, failureMechanismResults); + + // Assert + Assert.AreSame(section, assembly.Section); + Assert.AreSame(failureMechanismResults, assembly.FailureMechanismResults); + } + } +} \ No newline at end of file Fisheye: Tag ffec70662c33e5a611430ae73fa4d8cef5cdf147 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.Data.Test/CombinedFailureMechanismSectionAssemblyTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs =================================================================== diff -u -rf541cc599a6bfc6a25db047b1b7b838f4a8ddbf4 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs (.../AssessmentSectionAssemblyCalculatorOldTest.cs) (revision f541cc599a6bfc6a25db047b1b7b838f4a8ddbf4) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorOldTest.cs (.../AssessmentSectionAssemblyCalculatorOldTest.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -672,7 +672,7 @@ var calculator = new AssessmentSectionAssemblyCalculatorOld(factory); // Call - CombinedFailureMechanismSectionAssembly[] output = calculator.AssembleCombinedFailureMechanismSections(new[] + CombinedFailureMechanismSectionAssemblyOld[] output = calculator.AssembleCombinedFailureMechanismSections(new[] { new[] { Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/CombinedFailureMechanismSectionAssemblyCreatorOldTest.cs =================================================================== diff -u --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/CombinedFailureMechanismSectionAssemblyCreatorOldTest.cs (revision 0) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/CombinedFailureMechanismSectionAssemblyCreatorOldTest.cs (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -0,0 +1,98 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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; +using System.Collections.Generic; +using Assembly.Kernel.Old.Model; +using Assembly.Kernel.Old.Model.FmSectionTypes; +using Core.Common.TestUtil; +using NUnit.Framework; +using Riskeer.AssemblyTool.Data; +using Riskeer.AssemblyTool.KernelWrapper.Creators; +using Riskeer.AssemblyTool.KernelWrapper.TestUtil; + +namespace Riskeer.AssemblyTool.KernelWrapper.Test.Creators +{ + [TestFixture] + public class CombinedFailureMechanismSectionAssemblyCreatorOldTest + { + [Test] + public void Create_ResultNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => CombinedFailureMechanismSectionAssemblyCreatorOld.Create(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("result", exception.ParamName); + } + + [Test] + public void Create_WithResult_ReturnCombinedFailureMechanismSectionAssemblies() + { + // Setup + var random = new Random(21); + + var sections = new[] + { + new Tuple(0, 2), + new Tuple(2, 5), + new Tuple(5, random.NextDouble(5, 6)) + }; + + var failureMechanismResults = new[] + { + new FailureMechanismSectionList(string.Empty, new[] + { + CreateCategory(sections[0], random), + CreateCategory(sections[1], random), + CreateCategory(sections[2], random) + }), + new FailureMechanismSectionList(string.Empty, new[] + { + CreateCategory(sections[0], random), + CreateCategory(sections[1], random), + CreateCategory(sections[2], random) + }) + }; + + FmSectionWithDirectCategory[] combinedResults = + { + CreateCategory(sections[0], random), + CreateCategory(sections[1], random), + CreateCategory(sections[2], random) + }; + + var assembly = new AssemblyResult(failureMechanismResults, combinedResults); + + // Call + IEnumerable results = CombinedFailureMechanismSectionAssemblyCreatorOld.Create(assembly); + + // Assert + CombinedFailureMechanismSectionAssemblyAssert.AssertAssembly(assembly, results); + } + + private static FmSectionWithDirectCategory CreateCategory(Tuple section, Random random) + { + return new FmSectionWithDirectCategory(section.Item1, section.Item2, random.NextEnumValue()); + } + } +} \ No newline at end of file Fisheye: Tag ffec70662c33e5a611430ae73fa4d8cef5cdf147 refers to a dead (removed) revision in file `Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Creators/CombinedFailureMechanismSectionAssemblyCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs =================================================================== diff -u -re27da81458ec24f65847f2232bf0f0fc99af0f17 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision e27da81458ec24f65847f2232bf0f0fc99af0f17) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -49,9 +49,9 @@ /// /// Gets or sets the output of the combined failure mechanism section assembly. /// - public IEnumerable CombinedFailureMechanismSectionAssemblyOutput { get; set; } + public IEnumerable CombinedFailureMechanismSectionAssemblyOutput { get; set; } - public IEnumerable AssembleCombinedFailureMechanismSections( + public IEnumerable AssembleCombinedFailureMechanismSections( IEnumerable> input, double assessmentSectionLength) { if (ThrowExceptionOnCalculate) @@ -62,7 +62,7 @@ CombinedFailureMechanismSectionsInput = input; AssessmentSectionLength = assessmentSectionLength; - return new List(); + return new List(); } } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubOld.cs =================================================================== diff -u -r411152ca8360a1f0b6ea680314f5771ac4792dc9 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubOld.cs (.../AssessmentSectionAssemblyCalculatorStubOld.cs) (revision 411152ca8360a1f0b6ea680314f5771ac4792dc9) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubOld.cs (.../AssessmentSectionAssemblyCalculatorStubOld.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -103,7 +103,7 @@ /// /// Gets or sets the output of the combined failure mechanism section assembly. /// - public IEnumerable CombinedFailureMechanismSectionAssemblyOutput { get; set; } + public IEnumerable CombinedFailureMechanismSectionAssemblyOutput { get; set; } /// /// Sets an indicator whether an exception must be thrown while performing a calculation. @@ -165,7 +165,7 @@ return AssembleAssessmentSectionCategoryGroupOutput.Value; } - public IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, + public IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, double assessmentSectionLength) { if (ThrowExceptionOnCalculate) @@ -178,7 +178,7 @@ return CombinedFailureMechanismSectionAssemblyOutput ?? (CombinedFailureMechanismSectionAssemblyOutput = new[] { - new CombinedFailureMechanismSectionAssembly( + new CombinedFailureMechanismSectionAssemblyOld( new CombinedAssemblyFailureMechanismSection(0, 1, FailureMechanismSectionAssemblyCategoryGroup.IIIv), input.Select(failureMechanism => FailureMechanismSectionAssemblyCategoryGroup.VIv).ToArray()) }); Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionAssemblyAssert.cs =================================================================== diff -u -r86db41f54622d8d64a9e70cd96ae8a4198de4703 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionAssemblyAssert.cs (.../CombinedFailureMechanismSectionAssemblyAssert.cs) (revision 86db41f54622d8d64a9e70cd96ae8a4198de4703) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionAssemblyAssert.cs (.../CombinedFailureMechanismSectionAssemblyAssert.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -36,10 +36,10 @@ /// Asserts whether is equal to . /// /// The original . - /// The actual collection of . + /// The actual collection of . /// Thrown when /// is not equal to . - public static void AssertAssembly(AssemblyResult original, IEnumerable actual) + public static void AssertAssembly(AssemblyResult original, IEnumerable actual) { FmSectionWithDirectCategory[] combinedResults = original.CombinedSectionResult.ToArray(); Assert.AreEqual(combinedResults.Length, actual.Count()); Index: Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs =================================================================== diff -u -r6c60ef8aa494a4e0ff4a77657a751478162efceb -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs (.../AssessmentSectionAssemblyFactory.cs) (revision 6c60ef8aa494a4e0ff4a77657a751478162efceb) +++ Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs (.../AssessmentSectionAssemblyFactory.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -187,7 +187,7 @@ }) .ToDictionary(x => x.FailureMechanism, x => x.Index); - IEnumerable output = calculator.AssembleCombinedFailureMechanismSections( + IEnumerable output = calculator.AssembleCombinedFailureMechanismSections( CombinedAssemblyFailureMechanismSectionFactory.CreateInput(assessmentSection, failureMechanismsToAssemble.Keys, useManual), assessmentSection.ReferenceLine.Length); Index: Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResultFactory.cs =================================================================== diff -u -r520b3153840dada327c8bd936a4d6a7a07427331 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResultFactory.cs (.../CombinedFailureMechanismSectionAssemblyResultFactory.cs) (revision 520b3153840dada327c8bd936a4d6a7a07427331) +++ Riskeer/Integration/src/Riskeer.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResultFactory.cs (.../CombinedFailureMechanismSectionAssemblyResultFactory.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -41,7 +41,7 @@ /// The assessment section to use while creating the results. /// A collection of . /// Thrown when any parameter is null. - public static IEnumerable Create(IEnumerable output, + public static IEnumerable Create(IEnumerable output, IDictionary failureMechanisms, AssessmentSection assessmentSection) { Index: Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs =================================================================== diff -u -r411152ca8360a1f0b6ea680314f5771ac4792dc9 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs (.../AssessmentSectionAssemblyFactoryTest.cs) (revision 411152ca8360a1f0b6ea680314f5771ac4792dc9) +++ Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs (.../AssessmentSectionAssemblyFactoryTest.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -688,7 +688,7 @@ { var calculatorFactory = (TestAssemblyToolCalculatorFactoryOld) AssemblyToolCalculatorFactoryOld.Instance; AssessmentSectionAssemblyCalculatorStubOld calculator = calculatorFactory.LastCreatedAssessmentSectionAssemblyCalculator; - calculator.CombinedFailureMechanismSectionAssemblyOutput = new CombinedFailureMechanismSectionAssembly[0]; + calculator.CombinedFailureMechanismSectionAssemblyOutput = new CombinedFailureMechanismSectionAssemblyOld[0]; // Call AssessmentSectionAssemblyFactory.AssembleCombinedPerFailureMechanismSection(assessmentSection, random.NextBoolean()); @@ -891,10 +891,10 @@ return assessmentSection; } - private static CombinedFailureMechanismSectionAssembly CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, int seed) + private static CombinedFailureMechanismSectionAssemblyOld CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, int seed) { var random = new Random(seed); - return new CombinedFailureMechanismSectionAssembly(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), + return new CombinedFailureMechanismSectionAssemblyOld(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), random.NextDouble(), random.NextEnumValue()), assessmentSection.GetFailureMechanisms() Index: Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultFactoryTest.cs =================================================================== diff -u -r520b3153840dada327c8bd936a4d6a7a07427331 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultFactoryTest.cs (.../CombinedFailureMechanismSectionAssemblyResultFactoryTest.cs) (revision 520b3153840dada327c8bd936a4d6a7a07427331) +++ Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultFactoryTest.cs (.../CombinedFailureMechanismSectionAssemblyResultFactoryTest.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -55,7 +55,7 @@ var random = new Random(21); // Call - TestDelegate call = () => CombinedFailureMechanismSectionAssemblyResultFactory.Create(Enumerable.Empty(), + TestDelegate call = () => CombinedFailureMechanismSectionAssemblyResultFactory.Create(Enumerable.Empty(), null, new AssessmentSection(random.NextEnumValue())); // Assert @@ -67,7 +67,7 @@ public void Create_AssessmentSectionNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => CombinedFailureMechanismSectionAssemblyResultFactory.Create(Enumerable.Empty(), + TestDelegate call = () => CombinedFailureMechanismSectionAssemblyResultFactory.Create(Enumerable.Empty(), new Dictionary(), null); // Assert @@ -94,8 +94,8 @@ var section2 = new CombinedAssemblyFailureMechanismSection(5, 11, random.NextEnumValue()); var output = new[] { - new CombinedFailureMechanismSectionAssembly(section1, GetFailureMechanismsOutput(failureMechanisms.Keys, random)), - new CombinedFailureMechanismSectionAssembly(section2, GetFailureMechanismsOutput(failureMechanisms.Keys, random)) + new CombinedFailureMechanismSectionAssemblyOld(section1, GetFailureMechanismsOutput(failureMechanisms.Keys, random)), + new CombinedFailureMechanismSectionAssemblyOld(section2, GetFailureMechanismsOutput(failureMechanisms.Keys, random)) }; // Call @@ -147,8 +147,8 @@ var section2 = new CombinedAssemblyFailureMechanismSection(5, 11, random.NextEnumValue()); var output = new[] { - new CombinedFailureMechanismSectionAssembly(section1, GetFailureMechanismsOutput(failureMechanisms.Keys, random)), - new CombinedFailureMechanismSectionAssembly(section2, GetFailureMechanismsOutput(failureMechanisms.Keys, random)) + new CombinedFailureMechanismSectionAssemblyOld(section1, GetFailureMechanismsOutput(failureMechanisms.Keys, random)), + new CombinedFailureMechanismSectionAssemblyOld(section2, GetFailureMechanismsOutput(failureMechanisms.Keys, random)) }; // Call Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/AssessmentSectionAssemblyMapDataFeaturesFactoryTest.cs =================================================================== diff -u -r411152ca8360a1f0b6ea680314f5771ac4792dc9 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/AssessmentSectionAssemblyMapDataFeaturesFactoryTest.cs (.../AssessmentSectionAssemblyMapDataFeaturesFactoryTest.cs) (revision 411152ca8360a1f0b6ea680314f5771ac4792dc9) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/AssessmentSectionAssemblyMapDataFeaturesFactoryTest.cs (.../AssessmentSectionAssemblyMapDataFeaturesFactoryTest.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -74,7 +74,7 @@ { var calculatorFactory = (TestAssemblyToolCalculatorFactoryOld) AssemblyToolCalculatorFactoryOld.Instance; AssessmentSectionAssemblyCalculatorStubOld calculator = calculatorFactory.LastCreatedAssessmentSectionAssemblyCalculator; - CombinedFailureMechanismSectionAssembly[] failureMechanismSectionAssembly = + CombinedFailureMechanismSectionAssemblyOld[] failureMechanismSectionAssembly = { CreateCombinedFailureMechanismSectionAssembly(assessmentSection, 20), CreateCombinedFailureMechanismSectionAssembly(assessmentSection, 21) @@ -160,10 +160,10 @@ } } - private static CombinedFailureMechanismSectionAssembly CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, int seed) + private static CombinedFailureMechanismSectionAssemblyOld CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, int seed) { var random = new Random(seed); - return new CombinedFailureMechanismSectionAssembly(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), + return new CombinedFailureMechanismSectionAssemblyOld(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), random.NextDouble(), random.NextEnumValue()), assessmentSection.GetFailureMechanisms() Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionMapViewTest.cs =================================================================== diff -u -r411152ca8360a1f0b6ea680314f5771ac4792dc9 -rffec70662c33e5a611430ae73fa4d8cef5cdf147 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionMapViewTest.cs (.../AssemblyResultPerSectionMapViewTest.cs) (revision 411152ca8360a1f0b6ea680314f5771ac4792dc9) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionMapViewTest.cs (.../AssemblyResultPerSectionMapViewTest.cs) (revision ffec70662c33e5a611430ae73fa4d8cef5cdf147) @@ -153,7 +153,7 @@ { var calculatorFactory = (TestAssemblyToolCalculatorFactoryOld) AssemblyToolCalculatorFactoryOld.Instance; AssessmentSectionAssemblyCalculatorStubOld calculator = calculatorFactory.LastCreatedAssessmentSectionAssemblyCalculator; - CombinedFailureMechanismSectionAssembly[] failureMechanismSectionAssembly = + CombinedFailureMechanismSectionAssemblyOld[] failureMechanismSectionAssembly = { CreateCombinedFailureMechanismSectionAssembly(assessmentSection, random.NextEnumValue()) @@ -447,11 +447,11 @@ return assessmentSection; } - private static CombinedFailureMechanismSectionAssembly CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, + private static CombinedFailureMechanismSectionAssemblyOld CreateCombinedFailureMechanismSectionAssembly(AssessmentSection assessmentSection, FailureMechanismSectionAssemblyCategoryGroup totalResult) { var random = new Random(37); - return new CombinedFailureMechanismSectionAssembly(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), + return new CombinedFailureMechanismSectionAssemblyOld(new CombinedAssemblyFailureMechanismSection(random.NextDouble(), random.NextDouble(), totalResult), assessmentSection.GetFailureMechanisms()