Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismAssemblyCalculator.cs =================================================================== diff -u -rff4a4a18fa807bdb2395122e3d35e4e0b947f9b5 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismAssemblyCalculator.cs (.../FailureMechanismAssemblyCalculator.cs) (revision ff4a4a18fa807bdb2395122e3d35e4e0b947f9b5) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismAssemblyCalculator.cs (.../FailureMechanismAssemblyCalculator.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -54,6 +54,32 @@ this.factory = factory; } + public FailureMechanismAssemblyResultWrapper Assemble(IEnumerable sectionAssemblyResults) + { + if (sectionAssemblyResults == null) + { + throw new ArgumentNullException(nameof(sectionAssemblyResults)); + } + + try + { + IFailureMechanismResultAssembler kernel = factory.CreateFailureMechanismAssemblyKernel(); + Probability result; + result = kernel.CalculateFailureMechanismFailureProbabilityBoi1A1( + sectionAssemblyResults.Select(sr => AssemblyCalculatorInputCreator.CreateProbability(sr.SectionProbability)).ToArray() + , false); + return new FailureMechanismAssemblyResultWrapper(result, AssemblyMethod.BOI1A1); + } + catch (AssemblyException e) + { + throw new FailureMechanismAssemblyCalculatorException(AssemblyErrorMessageCreator.CreateErrorMessage(e.Errors), e); + } + catch (Exception e) + { + throw new FailureMechanismAssemblyCalculatorException(AssemblyErrorMessageCreator.CreateGenericErrorMessage(), e); + } + } + public FailureMechanismAssemblyResultWrapper Assemble(double failureMechanismN, IEnumerable sectionAssemblyResults, bool applySectionLengthEffect) { @@ -67,19 +93,21 @@ IFailureMechanismResultAssembler kernel = factory.CreateFailureMechanismAssemblyKernel(); Probability result; + if (applySectionLengthEffect) { result = kernel.CalculateFailureMechanismFailureProbabilityBoi1A2( - sectionAssemblyResults.Select(sr => AssemblyCalculatorInputCreator.CreateProbability(sr.SectionProbability)).ToArray(), + sectionAssemblyResults.Select(sr => AssemblyCalculatorInputCreator.CreateProbability(sr.ProfileProbability)).ToArray(), failureMechanismN, false); return new FailureMechanismAssemblyResultWrapper(result, AssemblyMethod.BOI1A2); } - result = kernel.CalculateFailureMechanismFailureProbabilityBoi1A1( - sectionAssemblyResults.Select(sr => AssemblyCalculatorInputCreator.CreateProbability(sr.SectionProbability)).ToArray() - , false); - return new FailureMechanismAssemblyResultWrapper(result, AssemblyMethod.BOI1A1); + result = kernel.CalculateFailureMechanismFailureProbabilityBoi1A2( + sectionAssemblyResults.Select(sr => AssemblyCalculatorInputCreator.CreateProbability(sr.SectionProbability)).ToArray(), + failureMechanismN, + false); + return new FailureMechanismAssemblyResultWrapper(result, AssemblyMethod.BOI1A2); } catch (AssemblyException e) { Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismAssemblyCalculator.cs =================================================================== diff -u -r9517d33fc76456310d04623d2585aba246ecc895 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismAssemblyCalculator.cs (.../IFailureMechanismAssemblyCalculator.cs) (revision 9517d33fc76456310d04623d2585aba246ecc895) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismAssemblyCalculator.cs (.../IFailureMechanismAssemblyCalculator.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -41,5 +41,7 @@ /// Thrown when an error occurs while assembling. FailureMechanismAssemblyResultWrapper Assemble(double failureMechanismN, IEnumerable sectionAssemblyResults, bool applySectionLengthEffect); + + FailureMechanismAssemblyResultWrapper Assemble(IEnumerable sectionAssemblyResults); } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismAssemblyCalculatorTest.cs =================================================================== diff -u -r24d58b744d21e9ed947e366150c5f78f74593a93 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismAssemblyCalculatorTest.cs (.../FailureMechanismAssemblyCalculatorTest.cs) (revision 24d58b744d21e9ed947e366150c5f78f74593a93) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismAssemblyCalculatorTest.cs (.../FailureMechanismAssemblyCalculatorTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -119,13 +119,13 @@ { RiskeerFailureMechanismSectionAssemblyResult expected = sectionAssemblyResults.ElementAt(i); Probability actual = kernel.FailureMechanismSectionAssemblyResults.ElementAt(i); - ProbabilityAssert.AreEqual(expected.SectionProbability, actual); + ProbabilityAssert.AreEqual(expected.ProfileProbability, actual); } } } [Test] - public void Assemble_WithValidInputAndApplyLengthEffectFalse_SendsCorrectInputToKernel() + public void Assemble_WithValidInputAndApplyLengthEffectFalseP2_SendsCorrectInputToKernel() { // Setup var random = new Random(21); @@ -148,6 +148,42 @@ calculator.Assemble(failureMechanismN, sectionAssemblyResults, false); // Assert + Assert.AreEqual(failureMechanismN, kernel.LenghtEffectFactor); + Assert.IsFalse(kernel.PartialAssembly); + Assert.AreEqual(sectionAssemblyResults.Length, kernel.FailureMechanismSectionAssemblyResults.Count()); + for (var i = 0; i < sectionAssemblyResults.Length; i++) + { + RiskeerFailureMechanismSectionAssemblyResult expected = sectionAssemblyResults.ElementAt(i); + Probability actual = kernel.FailureMechanismSectionAssemblyResults.ElementAt(i); + ProbabilityAssert.AreEqual(expected.SectionProbability, actual); + } + } + } + + [Test] + public void Assemble_WithValidInputAndApplyLengthEffectFalseP1_SendsCorrectInputToKernel() + { + // Setup + var random = new Random(21); + double failureMechanismN = random.NextDouble(); + RiskeerFailureMechanismSectionAssemblyResult[] sectionAssemblyResults = + { + CreateSectionAssemblyResult(random.Next()), + CreateSectionAssemblyResult(random.Next()) + }; + + using (new AssemblyToolKernelFactoryConfig()) + { + var factory = (TestAssemblyToolKernelFactory) AssemblyToolKernelFactory.Instance; + FailureMechanismAssemblyKernelStub kernel = factory.LastCreatedFailureMechanismAssemblyKernel; + kernel.ProbabilityResult = new Probability(random.NextDouble()); + + var calculator = new FailureMechanismAssemblyCalculator(factory); + + // Call + calculator.Assemble(sectionAssemblyResults); + + // Assert Assert.AreEqual(0, kernel.LenghtEffectFactor); Assert.IsFalse(kernel.PartialAssembly); @@ -156,9 +192,7 @@ } [Test] - [TestCase(true, AssemblyMethod.BOI1A2)] - [TestCase(false, AssemblyMethod.BOI1A1)] - public void Assemble_WithValidOutput_ReturnsExpectedOutput(bool applyLengthEffect, AssemblyMethod expectedAssemblyMethod) + public void Assemble_WithValidOutput_ReturnsExpectedOutput() { // Setup var random = new Random(21); @@ -169,17 +203,41 @@ FailureMechanismAssemblyKernelStub kernel = factory.LastCreatedFailureMechanismAssemblyKernel; var output = new Probability(random.NextDouble()); kernel.ProbabilityResult = output; + + var calculator = new FailureMechanismAssemblyCalculator(factory); + // Call + FailureMechanismAssemblyResultWrapper assemblyResultWrapper = calculator.Assemble(Enumerable.Empty()); + + // Assert + Assert.IsTrue(kernel.Calculated); + ProbabilityAssert.AreEqual(assemblyResultWrapper.AssemblyResult, output); + Assert.AreEqual(assemblyResultWrapper.AssemblyMethod, AssemblyMethod.BOI1A1); + } + } + + [Test] + public void Assemble_WithValidOutputWithLengthEffect_ReturnsExpectedOutput() + { + // Setup + var random = new Random(21); + + using (new AssemblyToolKernelFactoryConfig()) + { + var factory = (TestAssemblyToolKernelFactory) AssemblyToolKernelFactory.Instance; + FailureMechanismAssemblyKernelStub kernel = factory.LastCreatedFailureMechanismAssemblyKernel; + var output = new Probability(random.NextDouble()); + kernel.ProbabilityResult = output; + var calculator = new FailureMechanismAssemblyCalculator(factory); // Call - FailureMechanismAssemblyResultWrapper assemblyResultWrapper = calculator.Assemble(random.NextDouble(), Enumerable.Empty(), - applyLengthEffect); + FailureMechanismAssemblyResultWrapper assemblyResultWrapper = calculator.Assemble(random.NextDouble(),Enumerable.Empty(),true); // Assert Assert.IsTrue(kernel.Calculated); ProbabilityAssert.AreEqual(assemblyResultWrapper.AssemblyResult, output); - Assert.AreEqual(assemblyResultWrapper.AssemblyMethod, expectedAssemblyMethod); + Assert.AreEqual(assemblyResultWrapper.AssemblyMethod, AssemblyMethod.BOI1A2); } } Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismAssemblyCalculatorStub.cs =================================================================== diff -u -r5798680cd9f7b412be38c49f10ea8ffdc961fb44 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismAssemblyCalculatorStub.cs (.../FailureMechanismAssemblyCalculatorStub.cs) (revision 5798680cd9f7b412be38c49f10ea8ffdc961fb44) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismAssemblyCalculatorStub.cs (.../FailureMechanismAssemblyCalculatorStub.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -70,5 +70,16 @@ return AssemblyResultOutput ?? (AssemblyResultOutput = new FailureMechanismAssemblyResultWrapper(0.1, AssemblyMethod.BOI1A1)); } + + public FailureMechanismAssemblyResultWrapper Assemble(IEnumerable sectionAssemblyResults) + { + if (ThrowExceptionOnCalculate) + { + throw new FailureMechanismAssemblyCalculatorException("Message", new Exception()); + } + + SectionAssemblyResultsInput = sectionAssemblyResults; + return AssemblyResultOutput ?? (AssemblyResultOutput = new FailureMechanismAssemblyResultWrapper(0.1, AssemblyMethod.BOI1A1)); + } } } \ No newline at end of file Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs (.../ClosingStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismAssemblyFactoryTest.cs (.../ClosingStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -78,7 +78,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -113,7 +113,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections } }; @@ -140,7 +140,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections } }; Index: Riskeer/Common/src/Riskeer.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs =================================================================== diff -u -r9517d33fc76456310d04623d2585aba246ecc895 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs (.../FailureMechanismAssemblyResultFactory.cs) (revision 9517d33fc76456310d04623d2585aba246ecc895) +++ Riskeer/Common/src/Riskeer.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs (.../FailureMechanismAssemblyResultFactory.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -60,19 +60,23 @@ throw new ArgumentNullException(nameof(failureMechanismAssemblyResult)); } - if (failureMechanismAssemblyResult.ProbabilityResultType == FailureMechanismAssemblyProbabilityResultType.Manual) - { - return new FailureMechanismAssemblyResultWrapper( - failureMechanismAssemblyResult.ManualFailureMechanismAssemblyProbability, - AssemblyMethod.Manual); - } - try { IFailureMechanismAssemblyCalculator calculator = AssemblyToolCalculatorFactory.Instance.CreateFailureMechanismAssemblyCalculator(AssemblyToolKernelFactory.Instance); - - return calculator.Assemble(failureMechanismN, failureMechanismSectionAssemblyResults, applyLengthEffect); + switch (failureMechanismAssemblyResult.ProbabilityResultType) + { + case FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections: + return calculator.Assemble(failureMechanismSectionAssemblyResults); + case FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile: + return calculator.Assemble(failureMechanismN, failureMechanismSectionAssemblyResults, applyLengthEffect); + case FailureMechanismAssemblyProbabilityResultType.Manual: + return new FailureMechanismAssemblyResultWrapper( + failureMechanismAssemblyResult.ManualFailureMechanismAssemblyProbability, + AssemblyMethod.Manual); + default: + return null; + } } catch (FailureMechanismAssemblyCalculatorException e) { Index: Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyProbabilityResultType.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyProbabilityResultType.cs (.../FailureMechanismAssemblyProbabilityResultType.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyProbabilityResultType.cs (.../FailureMechanismAssemblyProbabilityResultType.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -30,15 +30,19 @@ public enum FailureMechanismAssemblyProbabilityResultType { /// - /// The automatically calculated probability type. + /// The automatically calculated probability type based on the worst section or profile. /// - [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureMechanismAssemblyProbabilityResultTypeAutomatic_DisplayName))] - Automatic = 1, - + [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureMechanismAssemblyProbabilityResultTypeAutomaticWorstSectionOrProfile_DisplayName))] + AutomaticWorstSectionOrProfile = 1, /// + /// The automatically calculated probability type based on independent sections. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureMechanismAssemblyProbabilityResultTypeAutomaticIndependentSections_DisplayName))] + AutomaticIndependentSections = 2, + /// /// The manual probability type. /// [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureMechanismAssemblyProbabilityResultTypeManual_DisplayName))] - Manual = 2 + Manual = 3 } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyResult.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyResult.cs (.../FailureMechanismAssemblyResult.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/FailureMechanismAssemblyResult.cs (.../FailureMechanismAssemblyResult.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -38,7 +38,7 @@ /// public FailureMechanismAssemblyResult() { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic; + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections; ManualFailureMechanismAssemblyProbability = double.NaN; } Index: Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r27e236b0bdb79005bc1d9d6b4b78f7b3052c6086 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 27e236b0bdb79005bc1d9d6b4b78f7b3052c6086) +++ Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2022. All rights reserved. +// Copyright (C) Stichting Deltares 2022. All rights reserved. // // This file is part of Riskeer. // @@ -388,15 +388,26 @@ } /// - /// Looks up a localized string similar to Automatisch berekenen. + /// Looks up a localized string similar to Automatisch berekenen o.b.v. onafhankelijke vakken. /// - public static string FailureMechanismAssemblyProbabilityResultTypeAutomatic_DisplayName { + public static string FailureMechanismAssemblyProbabilityResultTypeAutomaticIndependentSections_DisplayName { get { - return ResourceManager.GetString("FailureMechanismAssemblyProbabilityResultTypeAutomatic_DisplayName", resourceCulture); + return ResourceManager.GetString("FailureMechanismAssemblyProbabilityResultTypeAutomaticIndependentSections_Display" + + "Name", resourceCulture); } } /// + /// Looks up a localized string similar to Automatisch berekenen o.b.v. slechtste doorsnede of vak. + /// + public static string FailureMechanismAssemblyProbabilityResultTypeAutomaticWorstSectionOrProfile_DisplayName { + get { + return ResourceManager.GetString("FailureMechanismAssemblyProbabilityResultTypeAutomaticWorstSectionOrProfile_Displ" + + "ayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Handmatig invullen. /// public static string FailureMechanismAssemblyProbabilityResultTypeManual_DisplayName { Index: Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.resx =================================================================== diff -u -r27e236b0bdb79005bc1d9d6b4b78f7b3052c6086 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 27e236b0bdb79005bc1d9d6b4b78f7b3052c6086) +++ Riskeer/Common/src/Riskeer.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -393,9 +393,12 @@ Beide - - Automatisch berekenen + + Automatisch berekenen o.b.v. onafhankelijke vakken + + Automatisch berekenen o.b.v. slechtste doorsnede of vak + Handmatig invullen Index: Riskeer/Common/src/Riskeer.Common.Forms/Views/FailureMechanismResultView.Designer.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/src/Riskeer.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/src/Riskeer.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -88,7 +88,7 @@ this.probabilityResultTypeComboBox.Location = new System.Drawing.Point(171, 10); this.probabilityResultTypeComboBox.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10); this.probabilityResultTypeComboBox.Name = "probabilityResultTypeComboBox"; - this.probabilityResultTypeComboBox.Size = new System.Drawing.Size(150, 21); + this.probabilityResultTypeComboBox.Size = new System.Drawing.Size(300, 21); this.probabilityResultTypeComboBox.TabIndex = 3; this.probabilityResultTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.ProbabilityResultTypeComboBoxSelectedIndexChanged); // @@ -141,8 +141,8 @@ protected Core.Common.Controls.DataGrid.DataGridViewControl DataGridViewControl; protected System.Windows.Forms.TableLayoutPanel TableLayoutPanel; + protected System.Windows.Forms.ComboBox probabilityResultTypeComboBox; private System.Windows.Forms.Label failureMechanismAssemblyLabel; - private System.Windows.Forms.ComboBox probabilityResultTypeComboBox; private System.Windows.Forms.TextBox failureMechanismAssemblyProbabilityTextBox; private ErrorProvider errorProvider; } Index: Riskeer/Common/test/Riskeer.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs (.../FailureMechanismAssemblyResultFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs (.../FailureMechanismAssemblyResultFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -66,13 +66,17 @@ // Setup var random = new Random(21); double n = random.NextDouble(); + var failureMechanismResult = new FailureMechanismAssemblyResult + { + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile + }; bool applyLengthEffect = random.NextBoolean(); IEnumerable sectionResults = Enumerable.Empty(); using (new AssemblyToolCalculatorFactoryConfig()) { // Call - FailureMechanismAssemblyResultFactory.AssembleFailureMechanism(n, sectionResults, applyLengthEffect, new FailureMechanismAssemblyResult()); + FailureMechanismAssemblyResultFactory.AssembleFailureMechanism(n, sectionResults, applyLengthEffect, failureMechanismResult); // Assert var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; Index: Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyProbabilityResultTypeTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyProbabilityResultTypeTest.cs (.../FailureMechanismAssemblyProbabilityResultTypeTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyProbabilityResultTypeTest.cs (.../FailureMechanismAssemblyProbabilityResultTypeTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -33,20 +33,26 @@ new Dictionary { { - FailureMechanismAssemblyProbabilityResultType.Automatic, 1 + FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, 1 }, { - FailureMechanismAssemblyProbabilityResultType.Manual, 2 + FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections, 2 + }, + { + FailureMechanismAssemblyProbabilityResultType.Manual, 3 } }; protected override IDictionary ExpectedDisplayNameForEnumValues => new Dictionary { { - FailureMechanismAssemblyProbabilityResultType.Automatic, "Automatisch berekenen" + FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, "Automatisch berekenen o.b.v. slechtste doorsnede of vak" }, { + FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections, "Automatisch berekenen o.b.v. onafhankelijke vakken" + }, + { FailureMechanismAssemblyProbabilityResultType.Manual, "Handmatig invullen" } }; Index: Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultExtensionsTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultExtensionsTest.cs (.../FailureMechanismAssemblyResultExtensionsTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultExtensionsTest.cs (.../FailureMechanismAssemblyResultExtensionsTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -40,7 +40,8 @@ } [Test] - [TestCase(FailureMechanismAssemblyProbabilityResultType.Automatic, false)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections, false)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, false)] [TestCase(FailureMechanismAssemblyProbabilityResultType.Manual, true)] public void IsManualProbability_WithFailureMechanismAssemblyProbabilityResultType_ReturnsExpectedResult( FailureMechanismAssemblyProbabilityResultType resultType, bool expectedResult) Index: Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultTest.cs (.../FailureMechanismAssemblyResultTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/FailureMechanism/FailureMechanismAssemblyResultTest.cs (.../FailureMechanismAssemblyResultTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -39,7 +39,7 @@ // Assert Assert.IsInstanceOf(result); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, result.ProbabilityResultType); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections, result.ProbabilityResultType); Assert.IsNaN(result.ManualFailureMechanismAssemblyProbability); } Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Helpers/FailureMechanismAssemblyResultValidationHelperTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Helpers/FailureMechanismAssemblyResultValidationHelperTest.cs (.../FailureMechanismAssemblyResultValidationHelperTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Helpers/FailureMechanismAssemblyResultValidationHelperTest.cs (.../FailureMechanismAssemblyResultValidationHelperTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -81,8 +81,7 @@ // Setup var result = new FailureMechanismAssemblyResult { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - }; + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile }; // Call string message = FailureMechanismAssemblyResultValidationHelper.GetValidationError(result); Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs =================================================================== diff -u -r3a373f58d7b900028886c692d07002299eb4bd9b -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 3a373f58d7b900028886c692d07002299eb4bd9b) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -213,9 +213,10 @@ Assert.IsInstanceOf>(comboBox.SelectedItem); var configurationTypes = (EnumDisplayWrapper[]) comboBox.DataSource; - Assert.AreEqual(2, configurationTypes.Length); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, configurationTypes[0].Value); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Manual, configurationTypes[1].Value); + Assert.AreEqual(3, configurationTypes.Length); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, configurationTypes[0].Value); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections, configurationTypes[1].Value); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Manual, configurationTypes[2].Value); Assert.AreEqual(failureMechanism.AssemblyResult.ProbabilityResultType, ((EnumDisplayWrapper) comboBox.SelectedItem).Value); } @@ -660,7 +661,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -670,7 +671,7 @@ { // Precondition ComboBox comboBox = GetProbabilityResultTypeComboBox(); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, comboBox.SelectedValue); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, comboBox.SelectedValue); // Then TextBox failureMechanismAssemblyProbabilityTextBox = GetFailureMechanismAssemblyProbabilityTextBox(); @@ -694,7 +695,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -704,7 +705,7 @@ { // Precondition ComboBox comboBox = GetProbabilityResultTypeComboBox(); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, comboBox.SelectedValue); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, comboBox.SelectedValue); // Then TextBox failureMechanismAssemblyProbabilityTextBox = GetFailureMechanismAssemblyProbabilityTextBox(); @@ -733,7 +734,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -753,7 +754,7 @@ { // Precondition ComboBox comboBox = GetProbabilityResultTypeComboBox(); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, comboBox.SelectedValue); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, comboBox.SelectedValue); ErrorProvider errorProvider = GetErrorProvider(view); TextBox failureMechanismAssemblyProbabilityTextBox = GetFailureMechanismAssemblyProbabilityTextBox(); @@ -785,7 +786,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic, + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, ManualFailureMechanismAssemblyProbability = 0.1 } }; @@ -799,7 +800,7 @@ { // Precondition ComboBox comboBox = GetProbabilityResultTypeComboBox(); - Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.Automatic, comboBox.SelectedValue); + Assert.AreEqual(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, comboBox.SelectedValue); ErrorProvider errorProvider = GetErrorProvider(view); TextBox failureMechanismAssemblyProbabilityTextBox = GetFailureMechanismAssemblyProbabilityTextBox(); @@ -830,7 +831,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -866,8 +867,8 @@ [Test] [SetCulture("nl-NL")] - [TestCase(FailureMechanismAssemblyProbabilityResultType.Automatic, FailureMechanismAssemblyProbabilityResultType.Manual)] - [TestCase(FailureMechanismAssemblyProbabilityResultType.Manual, FailureMechanismAssemblyProbabilityResultType.Automatic)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile, FailureMechanismAssemblyProbabilityResultType.Manual)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.Manual, FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile)] public void GivenFailureMechanismResultView_WhenChangingProbabilityResultType_ThenFailureMechanismAssemblyProbabilityUpdated( FailureMechanismAssemblyProbabilityResultType initialResultType, FailureMechanismAssemblyProbabilityResultType newResultType) @@ -897,7 +898,7 @@ { // Precondition TextBox failureMechanismAssemblyProbabilityTextBox = GetFailureMechanismAssemblyProbabilityTextBox(); - string expectedProbabilityText = initialResultType == FailureMechanismAssemblyProbabilityResultType.Automatic + string expectedProbabilityText = initialResultType == FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile ? assemblyResultText : manualProbabilityText; Assert.AreEqual(expectedProbabilityText, failureMechanismAssemblyProbabilityTextBox.Text); @@ -907,7 +908,7 @@ comboBox.SelectedValue = newResultType; // Then - expectedProbabilityText = newResultType == FailureMechanismAssemblyProbabilityResultType.Automatic + expectedProbabilityText = newResultType == FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile ? assemblyResultText : manualProbabilityText; Assert.AreEqual(expectedProbabilityText, failureMechanismAssemblyProbabilityTextBox.Text); @@ -1103,7 +1104,7 @@ // When ComboBox comboBox = GetProbabilityResultTypeComboBox(); - comboBox.SelectedValue = FailureMechanismAssemblyProbabilityResultType.Automatic; + comboBox.SelectedValue = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile; // Then errorMessage = errorProvider.GetError(failureMechanismAssemblyProbabilityTextBox); @@ -1162,7 +1163,7 @@ #region FailureMechanismAssemblyResultControls [Test] - [TestCase(FailureMechanismAssemblyProbabilityResultType.Automatic)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile)] [TestCase(FailureMechanismAssemblyProbabilityResultType.Manual)] public void FailureMechanismResultView_WithoutSections_FailureMechanismAssemblyResultsCorrectState( FailureMechanismAssemblyProbabilityResultType resultType) @@ -1193,7 +1194,7 @@ } [Test] - [TestCase(FailureMechanismAssemblyProbabilityResultType.Automatic)] + [TestCase(FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile)] [TestCase(FailureMechanismAssemblyProbabilityResultType.Manual)] public void FailureMechanismResultView_WithSections_FailureMechanismAssemblyResultsCorrectState( FailureMechanismAssemblyProbabilityResultType resultType) @@ -1351,7 +1352,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -1388,7 +1389,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection("Section 1"); Index: Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneErosionFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneErosionFailureMechanismAssemblyFactoryTest.cs (.../DuneErosionFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneErosionFailureMechanismAssemblyFactoryTest.cs (.../DuneErosionFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -78,8 +78,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] { @@ -113,8 +112,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -140,8 +138,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -81,7 +81,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -116,8 +116,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -144,8 +143,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs =================================================================== diff -u -raf47467339b640802c4d7bb067506d8e5260763b -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision af47467339b640802c4d7bb067506d8e5260763b) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -228,6 +228,7 @@ FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + failureMechanism.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile; FailureMechanismTestHelper.SetSections(failureMechanism, new[] { section Index: Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Data.Test/GrassCoverErosionOutwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Data.Test/GrassCoverErosionOutwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverErosionOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Data.Test/GrassCoverErosionOutwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverErosionOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -239,8 +239,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] { @@ -274,8 +273,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -301,8 +299,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismAssemblyFactoryTest.cs (.../HeightStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismAssemblyFactoryTest.cs (.../HeightStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -78,7 +78,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -113,7 +113,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections } }; @@ -140,7 +140,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticIndependentSections } }; Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs =================================================================== diff -u -ra4d91c5d1395152e53f463999a1e1cc79723e62e -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs (.../HeightStructuresCalculationActivityFactoryTest.cs) (revision a4d91c5d1395152e53f463999a1e1cc79723e62e) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs (.../HeightStructuresCalculationActivityFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -259,7 +259,7 @@ mocks.ReplayAll(); HydraulicBoundaryLocation hydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryData.GetLocations().First(); - + StructuresCalculation calculation1 = CreateValidCalculation(hydraulicBoundaryLocation); StructuresCalculation calculation2 = CreateValidCalculation(hydraulicBoundaryLocation); Index: Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/FailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/FailureMechanismAssemblyFactoryTest.cs (.../FailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/FailureMechanismAssemblyFactoryTest.cs (.../FailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -251,8 +251,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] { @@ -286,8 +285,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -313,8 +311,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs (.../PipingStructureFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Integration/test/Riskeer.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs (.../PipingStructureFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -80,8 +80,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] { @@ -115,8 +114,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -142,8 +140,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/FailureMechanismAssemblyResultRowFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/FailureMechanismAssemblyResultRowFactoryTest.cs (.../FailureMechanismAssemblyResultRowFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Factories/FailureMechanismAssemblyResultRowFactoryTest.cs (.../FailureMechanismAssemblyResultRowFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -105,8 +105,7 @@ failureMechanism.Stub(fm => fm.Code).Return(failureMechanismCode); failureMechanism.Stub(fm => fm.AssemblyResult).Return(new FailureMechanismAssemblyResult { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - }); + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile }); mocks.ReplayAll(); failureMechanism.InAssembly = true; @@ -142,8 +141,7 @@ failureMechanism.Stub(fm => fm.Code).Return(failureMechanismCode); failureMechanism.Stub(fm => fm.AssemblyResult).Return(new FailureMechanismAssemblyResult { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - }); + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile }); mocks.ReplayAll(); failureMechanism.InAssembly = true; Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Data.Test/MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Data.Test/MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Data.Test/MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -245,8 +245,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] { @@ -281,8 +280,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); @@ -308,8 +306,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic - } + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; var assessmentSection = new AssessmentSectionStub(); Index: Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs (.../PipingFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs (.../PipingFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -252,7 +252,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -288,7 +288,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -315,7 +315,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs (.../PipingFailureMechanismResultViewTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs (.../PipingFailureMechanismResultViewTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -222,6 +222,7 @@ FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var failureMechanism = new PipingFailureMechanism(); + failureMechanism.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile; FailureMechanismTestHelper.SetSections(failureMechanism, new[] { section Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismAssemblyFactoryTest.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismAssemblyFactoryTest.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -78,7 +78,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -113,7 +113,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -140,7 +140,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; Index: Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismAssemblyFactoryTest.cs (.../StabilityStoneCoverFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismAssemblyFactoryTest.cs (.../StabilityStoneCoverFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -239,7 +239,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -274,7 +274,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -301,7 +301,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Data.Test/WaveImpactAsphaltCoverFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r21db6e69fc90b3abcb46f2154edc9a88cf862cb7 --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Data.Test/WaveImpactAsphaltCoverFailureMechanismAssemblyFactoryTest.cs (.../WaveImpactAsphaltCoverFailureMechanismAssemblyFactoryTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Data.Test/WaveImpactAsphaltCoverFailureMechanismAssemblyFactoryTest.cs (.../WaveImpactAsphaltCoverFailureMechanismAssemblyFactoryTest.cs) (revision 21db6e69fc90b3abcb46f2154edc9a88cf862cb7) @@ -239,7 +239,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; failureMechanism.SetSections(new[] @@ -275,7 +275,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } }; @@ -302,7 +302,7 @@ { AssemblyResult = { - ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.Automatic + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticWorstSectionOrProfile } };