Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs =================================================================== diff -u -rb35dbde97af05d1e6aadc97021145e495e101712 -r07c4c0d2017a7e6796ee8b1550e12569e0c3c608 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision b35dbde97af05d1e6aadc97021145e495e101712) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 07c4c0d2017a7e6796ee8b1550e12569e0c3c608) @@ -222,9 +222,9 @@ using (ShowAssemblyResultTotalView()) { // Then - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, "D", "1/1"); - AssertAssessmentSectionAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName, "D"); + AssertAssemblyResultControl(totalControlName, "C"); + AssertFailureMechanismAssemblyCategoryControl("IIIt", "1/1"); + AssertAssemblyResultControl(failureMechanismsWithoutProbabilityControlName, "IIIt"); } } @@ -239,9 +239,9 @@ buttonTester.Properties.Enabled = true; // Precondition - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, "D", "1/1"); - AssertAssessmentSectionAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName, "D"); + AssertAssemblyResultControl(totalControlName, "C"); + AssertFailureMechanismAssemblyCategoryControl("IIIt", "1/1"); + AssertAssemblyResultControl(failureMechanismsWithoutProbabilityControlName, "IIIt"); // When var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; @@ -253,9 +253,9 @@ buttonTester.Click(); // Then - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "A"); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, "IIIt", "1/2"); - AssertAssessmentSectionAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName, "IVt"); + AssertAssemblyResultControl(totalControlName, "A"); + AssertFailureMechanismAssemblyCategoryControl("IIIt", "1/2"); + AssertAssemblyResultControl(failureMechanismsWithoutProbabilityControlName, "IVt"); } } @@ -270,9 +270,9 @@ buttonTester.Properties.Enabled = true; // Precondition - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, "D", "1/1"); - AssertAssessmentSectionAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName, "D"); + AssertAssemblyResultControl(totalControlName, "C"); + AssertFailureMechanismAssemblyCategoryControl("IIIt", "1/1"); + AssertAssemblyResultControl(failureMechanismsWithoutProbabilityControlName, "IIIt"); // When var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; @@ -282,9 +282,9 @@ buttonTester.Click(); // Then - AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(totalControlName); - AssertAssessmentSectionAssemblyWithProbabilityControlWithError(failureMechanismsWithProbabilityControlName); - AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(failureMechanismsWithoutProbabilityControlName); + AssertAssemblyResultWithoutProbabilityControlWithError(totalControlName); + AssertFailureMechanismAssemblyWithProbabilityControlWithError(); + AssertAssemblyResultWithoutProbabilityControlWithError(failureMechanismsWithoutProbabilityControlName); } } @@ -304,23 +304,23 @@ buttonTester.Properties.Enabled = true; // Precondition - AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(totalControlName); - AssertAssessmentSectionAssemblyWithProbabilityControlWithError(failureMechanismsWithProbabilityControlName); - AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(failureMechanismsWithoutProbabilityControlName); + AssertAssemblyResultWithoutProbabilityControlWithError(totalControlName); + AssertFailureMechanismAssemblyWithProbabilityControlWithError(); + AssertAssemblyResultWithoutProbabilityControlWithError(failureMechanismsWithoutProbabilityControlName); // When calculator.ThrowExceptionOnCalculate = false; buttonTester.Click(); // Then - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); - Assert.IsEmpty(GetError(GetAssemblyCategoryGroupControl(totalControlName))); + AssertAssemblyResultControl(totalControlName, "C"); + Assert.IsEmpty(GetError(GetAssemblyResultControl(totalControlName))); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, "D", "1/1"); - Assert.IsEmpty(GetError(GetAssemblyControl(failureMechanismsWithProbabilityControlName))); + AssertFailureMechanismAssemblyCategoryControl("IIIt", "1/1"); + Assert.IsEmpty(GetError(GetFailureMechanismAssemblyControl())); - AssertAssessmentSectionAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName, "D"); - Assert.IsEmpty(GetError(GetAssemblyCategoryGroupControl(failureMechanismsWithoutProbabilityControlName))); + AssertAssemblyResultControl(failureMechanismsWithoutProbabilityControlName, "IIIt"); + Assert.IsEmpty(GetError(GetAssemblyResultControl(failureMechanismsWithoutProbabilityControlName))); } } } @@ -527,22 +527,22 @@ return (DataGridView) new ControlTester("dataGridView").TheObject; } - private static AssessmentSectionAssemblyCategoryGroupControl GetAssemblyCategoryGroupControl(string controlName) + private static AssemblyResultControl GetAssemblyResultControl(string controlName) { - return (AssessmentSectionAssemblyCategoryGroupControl) new ControlTester(controlName).TheObject; + return (AssemblyResultControl) new ControlTester(controlName).TheObject; } - private static AssessmentSectionAssemblyControl GetAssemblyControl(string controlName) + private static FailureMechanismAssemblyControl GetFailureMechanismAssemblyControl() { - return (AssessmentSectionAssemblyControl) new ControlTester(controlName).TheObject; + return (FailureMechanismAssemblyControl)new ControlTester(failureMechanismsWithProbabilityControlName).TheObject; } private static BorderedLabel GetGroupLabel(AssemblyResultControl control) { return (BorderedLabel) ((TableLayoutPanel) control.Controls["GroupPanel"]).GetControlFromPosition(0, 0); } - private static BorderedLabel GetProbabilityLabel(AssemblyResultWithProbabilityControl control) + private static BorderedLabel GetProbabilityLabel(FailureMechanismAssemblyControl control) { return (BorderedLabel) ((TableLayoutPanel) control.Controls["probabilityPanel"]).GetControlFromPosition(0, 0); } @@ -658,27 +658,27 @@ #region Asserts total assembly control - private static void AssertAssessmentSectionAssemblyWithProbabilityControlWithError(string controlName) + private static void AssertFailureMechanismAssemblyWithProbabilityControlWithError() { - Assert.AreEqual("Message", GetError(GetAssemblyControl(controlName))); - AssertAssessmentSectionAssemblyControl(failureMechanismsWithProbabilityControlName, string.Empty, "-"); + Assert.AreEqual("Message", GetError(GetFailureMechanismAssemblyControl())); + AssertFailureMechanismAssemblyCategoryControl(string.Empty, "-"); } - private static void AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(string controlName) + private static void AssertAssemblyResultWithoutProbabilityControlWithError(string controlName) { - Assert.AreEqual("Message", GetError(GetAssemblyCategoryGroupControl(controlName))); - AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, string.Empty); + Assert.AreEqual("Message", GetError(GetAssemblyResultControl(controlName))); + AssertAssemblyResultControl(totalControlName, string.Empty); } - private static void AssertAssessmentSectionAssemblyCategoryGroupControl(string controlName, string expectedGroup) + private static void AssertAssemblyResultControl(string controlName, string expectedGroup) { - AssessmentSectionAssemblyCategoryGroupControl control = GetAssemblyCategoryGroupControl(controlName); + AssemblyResultControl control = GetAssemblyResultControl(controlName); Assert.AreEqual(expectedGroup, GetGroupLabel(control).Text); } - private static void AssertAssessmentSectionAssemblyControl(string controlName, string expectedGroup, string expectedProbability) + private static void AssertFailureMechanismAssemblyCategoryControl(string expectedGroup, string expectedProbability) { - AssessmentSectionAssemblyControl control = GetAssemblyControl(controlName); + FailureMechanismAssemblyControl control = GetFailureMechanismAssemblyControl(); Assert.AreEqual(expectedGroup, GetGroupLabel(control).Text); Assert.AreEqual(expectedProbability, GetProbabilityLabel(control).Text); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r0ebcd2c2000e767623f8eada05f920af400d5530 -r07c4c0d2017a7e6796ee8b1550e12569e0c3c608 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 0ebcd2c2000e767623f8eada05f920af400d5530) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/MacroStabilityOutwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityOutwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 07c4c0d2017a7e6796ee8b1550e12569e0c3c608) @@ -191,7 +191,7 @@ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc(); MacroStabilityOutwardsProbabilityAssessmentInput probabilityAssessmentInput = failureMechanism.MacroStabilityOutwardsProbabilityAssessmentInput; - Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), calculator.AssemblyCategoriesInput.N); + Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), calculator.FailureMechanismN); } var failureMechanismResultsContext = (FailureMechanismSectionResultContext)