Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs =================================================================== diff -u -r32abca44b759d2532e1bb10090cda0ec073c34ff -rebad9aba8cf976073338b40279fb12bcecdcac46 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision 32abca44b759d2532e1bb10090cda0ec073c34ff) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision ebad9aba8cf976073338b40279fb12bcecdcac46) @@ -54,6 +54,10 @@ private readonly MacroStabilityOutwardsFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; + private FailureMechanismSectionAssemblyCategoryGroup simpleAssemblyCategoryGroup; + private FailureMechanismSectionAssemblyCategoryGroup detailedAssemblyCategoryGroup; + private FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssemblyCategoryGroup; + private FailureMechanismSectionAssemblyCategoryGroup combinedAssemblyCategoryGroup; /// /// Creates a new instance of . @@ -206,22 +210,46 @@ /// /// Gets the simple assembly category group. /// - public FailureMechanismSectionAssemblyCategoryGroup SimpleAssemblyCategoryGroup { get; private set; } + public string SimpleAssemblyCategoryGroup + { + get + { + return FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(simpleAssemblyCategoryGroup); + } + } /// /// Gets the detailed assembly category group. /// - public FailureMechanismSectionAssemblyCategoryGroup DetailedAssemblyCategoryGroup { get; private set; } + public string DetailedAssemblyCategoryGroup + { + get + { + return FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(detailedAssemblyCategoryGroup); + } + } /// /// Gets the tailor made assembly category group. /// - public FailureMechanismSectionAssemblyCategoryGroup TailorMadeAssemblyCategoryGroup { get; private set; } + public string TailorMadeAssemblyCategoryGroup + { + get + { + return FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(tailorMadeAssemblyCategoryGroup); + } + } /// /// Gets the combined assembly category group. /// - public FailureMechanismSectionAssemblyCategoryGroup CombinedAssemblyCategoryGroup { get; private set; } + public string CombinedAssemblyCategoryGroup + { + get + { + return FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(combinedAssemblyCategoryGroup); + } + } /// /// Gets or sets the indicator whether the combined assembly should be overwritten by . @@ -313,11 +341,11 @@ { try { - SimpleAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleSimpleAssessment(SectionResult); + simpleAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleSimpleAssessment(SectionResult); } catch (AssemblyException e) { - SimpleAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; + simpleAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; ColumnStateDefinitions[simpleAssemblyCategoryGroupIndex].ErrorText = e.Message; } } @@ -326,14 +354,14 @@ { try { - DetailedAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleDetailedAssembly( + detailedAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleDetailedAssembly( SectionResult, failureMechanism, assessmentSection); } catch (AssemblyException e) { - DetailedAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; + detailedAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; ColumnStateDefinitions[detailedAssemblyCategoryGroupIndex].ErrorText = e.Message; } } @@ -342,14 +370,14 @@ { try { - TailorMadeAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleTailorMadeAssembly( + tailorMadeAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleTailorMadeAssembly( SectionResult, failureMechanism, assessmentSection); } catch (AssemblyException e) { - TailorMadeAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; + tailorMadeAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; ColumnStateDefinitions[tailorMadeAssemblyCategoryGroupIndex].ErrorText = e.Message; } } @@ -358,14 +386,14 @@ { try { - CombinedAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleCombinedAssembly( + combinedAssemblyCategoryGroup = MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactory.AssembleCombinedAssembly( SectionResult, failureMechanism, assessmentSection); } catch (AssemblyException e) { - CombinedAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; + combinedAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; ColumnStateDefinitions[combinedAssemblyCategoryGroupIndex].ErrorText = e.Message; } } @@ -403,13 +431,13 @@ else { FailureMechanismSectionResultRowHelper.SetAssemblyCategoryGroupStyle(ColumnStateDefinitions[simpleAssemblyCategoryGroupIndex], - SimpleAssemblyCategoryGroup); + simpleAssemblyCategoryGroup); FailureMechanismSectionResultRowHelper.SetAssemblyCategoryGroupStyle(ColumnStateDefinitions[detailedAssemblyCategoryGroupIndex], - DetailedAssemblyCategoryGroup); + detailedAssemblyCategoryGroup); FailureMechanismSectionResultRowHelper.SetAssemblyCategoryGroupStyle(ColumnStateDefinitions[tailorMadeAssemblyCategoryGroupIndex], - TailorMadeAssemblyCategoryGroup); + tailorMadeAssemblyCategoryGroup); FailureMechanismSectionResultRowHelper.SetAssemblyCategoryGroupStyle(ColumnStateDefinitions[combinedAssemblyCategoryGroupIndex], - CombinedAssemblyCategoryGroup); + combinedAssemblyCategoryGroup); } FailureMechanismSectionResultRowHelper.SetColumnState(ColumnStateDefinitions[manualAssemblyCategoryGroupIndex], !UseManualAssemblyCategoryGroup); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs =================================================================== diff -u -r32abca44b759d2532e1bb10090cda0ec073c34ff -rebad9aba8cf976073338b40279fb12bcecdcac46 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision 32abca44b759d2532e1bb10090cda0ec073c34ff) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision ebad9aba8cf976073338b40279fb12bcecdcac46) @@ -35,6 +35,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.Common.Forms.Views; @@ -230,10 +231,14 @@ ConstructionProperties); // Assert - Assert.AreEqual(calculator.SimpleAssessmentAssemblyOutput.Group, row.SimpleAssemblyCategoryGroup); - Assert.AreEqual(calculator.DetailedAssessmentAssemblyOutput.Group, row.DetailedAssemblyCategoryGroup); - Assert.AreEqual(calculator.TailorMadeAssessmentAssemblyOutput.Group, row.TailorMadeAssemblyCategoryGroup); - Assert.AreEqual(calculator.CombinedAssemblyCategoryOutput, row.CombinedAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.SimpleAssessmentAssemblyOutput.Group), + row.SimpleAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.DetailedAssessmentAssemblyOutput.Group), + row.DetailedAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.TailorMadeAssessmentAssemblyOutput.Group), + row.TailorMadeAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.CombinedAssemblyCategoryOutput.Value), + row.CombinedAssemblyCategoryGroup); mocks.VerifyAll(); } } @@ -376,20 +381,25 @@ ConstructionProperties); // Precondition - Assert.AreEqual(calculator.SimpleAssessmentAssemblyOutput.Group, row.SimpleAssemblyCategoryGroup); - Assert.AreEqual(calculator.DetailedAssessmentAssemblyOutput.Group, row.DetailedAssemblyCategoryGroup); - Assert.AreEqual(calculator.TailorMadeAssessmentAssemblyOutput.Group, row.TailorMadeAssemblyCategoryGroup); - Assert.AreEqual(calculator.CombinedAssemblyCategoryOutput, row.CombinedAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.SimpleAssessmentAssemblyOutput.Group), + row.SimpleAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.DetailedAssessmentAssemblyOutput.Group), + row.DetailedAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.TailorMadeAssessmentAssemblyOutput.Group), + row.TailorMadeAssemblyCategoryGroup); + Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.CombinedAssemblyCategoryOutput.Value), + row.CombinedAssemblyCategoryGroup); // When calculator.ThrowExceptionOnCalculate = true; row.SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther; // Then - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, row.SimpleAssemblyCategoryGroup); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, row.DetailedAssemblyCategoryGroup); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, row.TailorMadeAssemblyCategoryGroup); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, row.CombinedAssemblyCategoryGroup); + string expectedAssemblyDisplayName = FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(FailureMechanismSectionAssemblyCategoryGroup.None); + Assert.AreEqual(expectedAssemblyDisplayName, row.SimpleAssemblyCategoryGroup); + Assert.AreEqual(expectedAssemblyDisplayName, row.DetailedAssemblyCategoryGroup); + Assert.AreEqual(expectedAssemblyDisplayName, row.TailorMadeAssemblyCategoryGroup); + Assert.AreEqual(expectedAssemblyDisplayName, row.CombinedAssemblyCategoryGroup); mocks.VerifyAll(); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacroStabilityOutwardsResultViewTest.cs =================================================================== diff -u -r32abca44b759d2532e1bb10090cda0ec073c34ff -rebad9aba8cf976073338b40279fb12bcecdcac46 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacroStabilityOutwardsResultViewTest.cs (.../MacroStabilityOutwardsResultViewTest.cs) (revision 32abca44b759d2532e1bb10090cda0ec073c34ff) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacroStabilityOutwardsResultViewTest.cs (.../MacroStabilityOutwardsResultViewTest.cs) (revision ebad9aba8cf976073338b40279fb12bcecdcac46) @@ -191,10 +191,10 @@ Assert.AreEqual("-", cells[detailedAssessmentProbabilityIndex].FormattedValue); Assert.AreEqual(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None, cells[tailorMadeAssessmentResultIndex].Value); Assert.AreEqual("-", cells[tailorMadeAssessmentProbabilityIndex].FormattedValue); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.Iv, cells[simpleAssemblyCategoryGroupIndex].Value); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.VIv, cells[detailedAssemblyCategoryGroupIndex].Value); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.VIv, cells[tailorMadeAssemblyCategoryGroupIndex].Value); - Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.VIv, cells[combinedAssemblyCategoryGroupIndex].Value); + Assert.AreEqual("Iv", cells[simpleAssemblyCategoryGroupIndex].Value); + Assert.AreEqual("VIv", cells[detailedAssemblyCategoryGroupIndex].Value); + Assert.AreEqual("VIv", cells[tailorMadeAssemblyCategoryGroupIndex].Value); + Assert.AreEqual("VIv", cells[combinedAssemblyCategoryGroupIndex].Value); Assert.AreEqual(false, cells[useManualAssemblyCategoryGroupIndex].Value); Assert.AreEqual(SelectableFailureMechanismSectionAssemblyCategoryGroup.None, cells[manualAssemblyCategoryGroupIndex].Value); }