Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r643a67a28ec8d9edda4a5bd0844e45692452332e -rf12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision 643a67a28ec8d9edda4a5bd0844e45692452332e) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision f12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Forms; @@ -40,7 +41,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; -using Ringtoets.Common.Plugin.TestUtil; +using Ringtoets.Common.Service.TestUtil; using Ringtoets.DuneErosion.Data; using Ringtoets.DuneErosion.Data.TestUtil; using Ringtoets.DuneErosion.Forms.PresentationObjects; @@ -543,20 +544,33 @@ string[] msgs = messages.ToArray(); Assert.AreEqual(40, msgs.Length); - const string duneCalculationName = "Hydraulische belastingen"; - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "Iv->IIv", msgs, 0); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IIv->IIIv", msgs, 8); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IIIv->IVv", msgs, 16); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IVv->Vv", msgs, 24); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "Vv->VIv", msgs, 32); + AssertDuneLocationCalculationMessages(duneLocation.Name, "Iv->IIv", msgs, 0); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IIv->IIIv", msgs, 8); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IIIv->IVv", msgs, 16); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IVv->Vv", msgs, 24); + AssertDuneLocationCalculationMessages(duneLocation.Name, "Vv->VIv", msgs, 32); }); } } } + + private static void AssertDuneLocationCalculationMessages(string duneLocationName, + string categoryName, + IEnumerable actualMessages, + int startIndex) + { + Assert.AreEqual($"Hydraulische belastingen berekenen voor locatie '{duneLocationName}' (Categorie {categoryName}) is gestart.", + actualMessages.ElementAt(startIndex)); + CalculationServiceTestHelper.AssertValidationStartMessage(actualMessages.ElementAt(startIndex + 1)); + CalculationServiceTestHelper.AssertValidationEndMessage(actualMessages.ElementAt(startIndex + 2)); + CalculationServiceTestHelper.AssertCalculationStartMessage(actualMessages.ElementAt(startIndex + 3)); + Assert.AreEqual($"Hydraulische belastingenberekening voor locatie '{duneLocationName}' (Categorie {categoryName}) is niet geconvergeerd.", + actualMessages.ElementAt(startIndex + 4)); + StringAssert.StartsWith("Hydraulische belastingenberekening is uitgevoerd op de tijdelijke locatie", + actualMessages.ElementAt(startIndex + 5)); + CalculationServiceTestHelper.AssertCalculationEndMessage(actualMessages.ElementAt(startIndex + 6)); + Assert.AreEqual($"Hydraulische belastingen berekenen voor locatie '{duneLocationName}' (Categorie {categoryName}) is gelukt.", + actualMessages.ElementAt(startIndex + 7)); + } } } \ No newline at end of file Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r643a67a28ec8d9edda4a5bd0844e45692452332e -rf12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsGroupContextTreeNodeInfoTest.cs (.../DuneLocationCalculationsGroupContextTreeNodeInfoTest.cs) (revision 643a67a28ec8d9edda4a5bd0844e45692452332e) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsGroupContextTreeNodeInfoTest.cs (.../DuneLocationCalculationsGroupContextTreeNodeInfoTest.cs) (revision f12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; @@ -36,7 +37,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.TestUtil; -using Ringtoets.Common.Plugin.TestUtil; +using Ringtoets.Common.Service.TestUtil; using Ringtoets.DuneErosion.Data; using Ringtoets.DuneErosion.Data.TestUtil; using Ringtoets.DuneErosion.Forms.PresentationObjects; @@ -463,17 +464,11 @@ string[] msgs = messages.ToArray(); Assert.AreEqual(40, msgs.Length); - const string duneCalculationName = "Hydraulische belastingen"; - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "Iv->IIv", msgs, 0); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IIv->IIIv", msgs, 8); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IIIv->IVv", msgs, 16); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "IVv->Vv", msgs, 24); - HydraulicBoundaryLocationCalculationActivityLogTestHelper.AssertHydraulicBoundaryLocationCalculationMessages( - duneLocation.Name, duneCalculationName, "Vv->VIv", msgs, 32); + AssertDuneLocationCalculationMessages(duneLocation.Name, "Iv->IIv", msgs, 0); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IIv->IIIv", msgs, 8); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IIIv->IVv", msgs, 16); + AssertDuneLocationCalculationMessages(duneLocation.Name, "IVv->Vv", msgs, 24); + AssertDuneLocationCalculationMessages(duneLocation.Name, "Vv->VIv", msgs, 32); }); } } @@ -482,6 +477,25 @@ mocks.VerifyAll(); } + private static void AssertDuneLocationCalculationMessages(string duneLocationName, + string categoryName, + IEnumerable actualMessages, + int startIndex) + { + Assert.AreEqual($"Hydraulische belastingen berekenen voor locatie '{duneLocationName}' (Categorie {categoryName}) is gestart.", + actualMessages.ElementAt(startIndex)); + CalculationServiceTestHelper.AssertValidationStartMessage(actualMessages.ElementAt(startIndex + 1)); + CalculationServiceTestHelper.AssertValidationEndMessage(actualMessages.ElementAt(startIndex + 2)); + CalculationServiceTestHelper.AssertCalculationStartMessage(actualMessages.ElementAt(startIndex + 3)); + Assert.AreEqual($"Hydraulische belastingenberekening voor locatie '{duneLocationName}' (Categorie {categoryName}) is niet geconvergeerd.", + actualMessages.ElementAt(startIndex + 4)); + StringAssert.StartsWith("Hydraulische belastingenberekening is uitgevoerd op de tijdelijke locatie", + actualMessages.ElementAt(startIndex + 5)); + CalculationServiceTestHelper.AssertCalculationEndMessage(actualMessages.ElementAt(startIndex + 6)); + Assert.AreEqual($"Hydraulische belastingen berekenen voor locatie '{duneLocationName}' (Categorie {categoryName}) is gelukt.", + actualMessages.ElementAt(startIndex + 7)); + } + private static double GetExpectedNorm(DuneErosionFailureMechanism failureMechanism, double norm) { return failureMechanismSpecificNormFactor * norm * (failureMechanism.Contribution / 100) / failureMechanism.GeneralInput.N; Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Handlers/FailureMechanismContributionNormChangeHandlerTest.cs =================================================================== diff -u -r9158d109b1e121cd15cb10c9c20ca2074f667ece -rf12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Handlers/FailureMechanismContributionNormChangeHandlerTest.cs (.../FailureMechanismContributionNormChangeHandlerTest.cs) (revision 9158d109b1e121cd15cb10c9c20ca2074f667ece) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Handlers/FailureMechanismContributionNormChangeHandlerTest.cs (.../FailureMechanismContributionNormChangeHandlerTest.cs) (revision f12c66e6855a6c5bec7e6ccd7ac73e5b58c9b534) @@ -210,7 +210,7 @@ Action call = () => affectedObjects = handler.SetPropertyValueAfterConfirmation(() => {}); // Assert - TestHelper.AssertLogMessageIsGenerated(call, "Alle berekende hydraulische belastingenlocaties zijn verwijderd.", 1); + TestHelper.AssertLogMessageIsGenerated(call, "Alle berekende hydraulische belastingen zijn verwijderd.", 1); AssertHydraulicBoundaryLocationCalculationOutput(assessmentSection, false); DuneLocationsTestHelper.AssertDuneLocationCalculationsHaveNoOutputs(assessmentSection.DuneErosion);