Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs =================================================================== diff -u -re2c43d0be7b4ba0b14476579b245ddec43eb5a03 -r8d1f30dda2764aa014653114a0800dd3e6deef99 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs (.../WaterPressureAsphaltCoverSectionResultRowTest.cs) (revision e2c43d0be7b4ba0b14476579b245ddec43eb5a03) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs (.../WaterPressureAsphaltCoverSectionResultRowTest.cs) (revision 8d1f30dda2764aa014653114a0800dd3e6deef99) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Drawing; using Core.Common.Base; using Core.Common.Controls.DataGrid; using Core.Common.TestUtil; @@ -371,6 +372,40 @@ } } + [Test] + [TestCaseSource(typeof(FailureMechanismSectionResultRowTestHelper), nameof(FailureMechanismSectionResultRowTestHelper.CategoryGroupColorCases))] + public void Constructor_WithAssemblyCategoryGroupsSet_ExpectedColumnStates(FailureMechanismSectionAssemblyCategoryGroup assemblyCategoryGroup, + Color expectedBackgroundColor) + { + // Setup + FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); + var result = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section); + + using (new AssemblyToolCalculatorFactoryConfig()) + { + var calculatorfactory = (TestAssemblyToolCalculatorFactory)AssemblyToolCalculatorFactory.Instance; + FailureMechanismSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedFailureMechanismSectionAssemblyCalculator; + var assemblyOutput = new FailureMechanismSectionAssembly(0, assemblyCategoryGroup); + calculator.SimpleAssessmentAssemblyOutput = assemblyOutput; + calculator.DetailedAssessmentAssemblyGroupOutput = assemblyCategoryGroup; + calculator.TailorMadeAssemblyCategoryOutput = assemblyCategoryGroup; + calculator.CombinedAssemblyCategoryOutput = assemblyCategoryGroup; + + // Call + var row = new WaterPressureAsphaltCoverSectionResultRow(result, ConstructionProperties); + + // Assert + IDictionary columnStateDefinitions = row.ColumnStateDefinitions; + + FailureMechanismSectionResultRowTestHelper.AssertColumnWithColorState(columnStateDefinitions[ConstructionProperties.SimpleAssemblyCategoryGroupIndex], + expectedBackgroundColor); + FailureMechanismSectionResultRowTestHelper.AssertColumnWithColorState(columnStateDefinitions[ConstructionProperties.TailorMadeAssemblyCategoryGroupIndex], + expectedBackgroundColor); + FailureMechanismSectionResultRowTestHelper.AssertColumnWithColorState(columnStateDefinitions[ConstructionProperties.CombinedAssemblyCategoryGroupIndex], + expectedBackgroundColor); + } + } + #endregion #region Registration