Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/WaveHeightContextTreeNodeInfoTest.cs =================================================================== diff -u -r5cf6fd5b4bd57890b104182c35fff4180b9d7aba -r7abe36a7f4949221955e0c974564f61c1350e81c --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/WaveHeightContextTreeNodeInfoTest.cs (.../WaveHeightContextTreeNodeInfoTest.cs) (revision 5cf6fd5b4bd57890b104182c35fff4180b9d7aba) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/WaveHeightContextTreeNodeInfoTest.cs (.../WaveHeightContextTreeNodeInfoTest.cs) (revision 7abe36a7f4949221955e0c974564f61c1350e81c) @@ -256,7 +256,7 @@ } [Test] - public void ForeColor_ContextHasHydraulicBoundaryDatabaseData_ReturnControlText() + public void ForeColor_ContextHasNoCalculations_ReturnDisabledColor() { // Setup var assessmentSection = mockRepository.Stub(); @@ -273,12 +273,39 @@ Color color = info.ForeColor(waterLevelContext); // Assert - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), color); + Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), color); } mockRepository.VerifyAll(); } + [Test] + public void ForeColor_ContextHasCalculations_ReturnControlColor() + { + // Setup + var assessmentSection = mockRepository.Stub(); + assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + var location = new HydraulicBoundaryLocation(123, "aName", 1.1, 2.2) + { + WaveHeight = 1.0 + }; + assessmentSection.HydraulicBoundaryDatabase.Locations.Add(location); + mockRepository.ReplayAll(); + var waterLevelContext = new WaveHeightContext(assessmentSection); + + using (var plugin = new RingtoetsPlugin()) + { + var info = GetInfo(plugin); + + // Call + Color color = info.ForeColor(waterLevelContext); + + // Assert + Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), color); + } + mockRepository.VerifyAll(); + } + [Test] public void GivenHydraulicBoundaryDatabaseWithNonExistingFilePath_WhenCalculatingAssessmentLevelFromContextMenu_ThenLogMessagesAddedPreviousOutputNotAffected() {