Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs =================================================================== diff -u -r8ce2a53630dac53a91a8b3ad4d4919d457532714 -re2c43d0be7b4ba0b14476579b245ddec43eb5a03 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs (.../WaterPressureAsphaltCoverSectionResultRowTest.cs) (revision 8ce2a53630dac53a91a8b3ad4d4919d457532714) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/WaterPressureAsphaltCoverSectionResultRowTest.cs (.../WaterPressureAsphaltCoverSectionResultRowTest.cs) (revision e2c43d0be7b4ba0b14476579b245ddec43eb5a03) @@ -301,6 +301,78 @@ } } + #region Column States + + [Test] + [TestCase(SimpleAssessmentResultType.None, true)] + [TestCase(SimpleAssessmentResultType.AssessFurther, true)] + [TestCase(SimpleAssessmentResultType.NotApplicable, false)] + [TestCase(SimpleAssessmentResultType.ProbabilityNegligible, false)] + public void Constructor_WithSimpleAssessmentResultSet_ExpectedColumnStates(SimpleAssessmentResultType simpleAssessmentResult, + bool cellsEnabled) + { + // Setup + FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); + var result = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section) + { + SimpleAssessmentResult = simpleAssessmentResult + }; + + using (new AssemblyToolCalculatorFactoryConfig()) + { + // Call + var row = new WaterPressureAsphaltCoverSectionResultRow(result, ConstructionProperties); + + // Assert + IDictionary columnStateDefinitions = row.ColumnStateDefinitions; + + FailureMechanismSectionResultRowTestHelper.AssertColumnState(columnStateDefinitions[ConstructionProperties.TailorMadeAssessmentResultIndex], + cellsEnabled); + } + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_WithUseManualAssemblyCategoryGroupSet_ExpectedColumnStates(bool useManualAssemblyCategoryGroup) + { + // Setup + FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); + var result = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section) + { + UseManualAssemblyCategoryGroup = useManualAssemblyCategoryGroup + }; + + using (new AssemblyToolCalculatorFactoryConfig()) + { + // Call + var row = new WaterPressureAsphaltCoverSectionResultRow(result, ConstructionProperties); + + // Assert + IDictionary columnStateDefinitions = row.ColumnStateDefinitions; + + FailureMechanismSectionResultRowTestHelper.AssertColumnState(columnStateDefinitions[ConstructionProperties.SimpleAssessmentResultIndex], + !useManualAssemblyCategoryGroup); + FailureMechanismSectionResultRowTestHelper.AssertColumnState(columnStateDefinitions[ConstructionProperties.TailorMadeAssessmentResultIndex], + !useManualAssemblyCategoryGroup); + + if (useManualAssemblyCategoryGroup) + { + FailureMechanismSectionResultRowTestHelper.AssertColumnStateIsDisabled( + columnStateDefinitions[ConstructionProperties.SimpleAssemblyCategoryGroupIndex]); + FailureMechanismSectionResultRowTestHelper.AssertColumnStateIsDisabled( + columnStateDefinitions[ConstructionProperties.TailorMadeAssemblyCategoryGroupIndex]); + FailureMechanismSectionResultRowTestHelper.AssertColumnStateIsDisabled( + columnStateDefinitions[ConstructionProperties.CombinedAssemblyCategoryGroupIndex]); + } + + FailureMechanismSectionResultRowTestHelper.AssertColumnState(columnStateDefinitions[ConstructionProperties.ManualAssemblyCategoryGroupIndex], + useManualAssemblyCategoryGroup); + } + } + + #endregion + #region Registration [Test]