Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs =================================================================== diff -u -r87c8156d44cba5489f6128da6b31260a4bace1d5 -raa2276eb72eb3bb6e4a69ebe05becdbf28a8356b --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 87c8156d44cba5489f6128da6b31260a4bace1d5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision aa2276eb72eb3bb6e4a69ebe05becdbf28a8356b) @@ -23,9 +23,11 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Gui.Commands; +using log4net; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Integration.Data; +using Ringtoets.Integration.Plugin.Properties; namespace Ringtoets.Integration.Plugin.Merge { @@ -34,6 +36,8 @@ /// public class AssessmentSectionMergeHandler : IAssessmentSectionMergeHandler { + private static readonly ILog log = LogManager.GetLogger(typeof(AssessmentSectionMergeHandler)); + private readonly IViewCommands viewCommands; /// @@ -99,6 +103,8 @@ sourceAssessmentSection.WaveHeightCalculationsForLowerLimitNorm); MergeHydraulicBoundaryLocationCalculations(targetAssessmentSection.WaveHeightCalculationsForFactorizedLowerLimitNorm, sourceAssessmentSection.WaveHeightCalculationsForFactorizedLowerLimitNorm); + + log.Info(Resources.AssessmentSectionMergeHandler_MergeHydraulicBoundaryLocations_HydraulicBoundaryLocations_merged); } private static void MergeHydraulicBoundaryLocationCalculations(IEnumerable targetCalculations, Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs =================================================================== diff -u -re0476d8c340b412a22c14d0869888a84e0e4fe5f -raa2276eb72eb3bb6e4a69ebe05becdbf28a8356b --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e0476d8c340b412a22c14d0869888a84e0e4fe5f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision aa2276eb72eb3bb6e4a69ebe05becdbf28a8356b) @@ -142,6 +142,16 @@ } /// + /// Looks up a localized string similar to Hydraulische belastingen zijn samengevoegd.. + /// + public static string AssessmentSectionMergeHandler_MergeHydraulicBoundaryLocations_HydraulicBoundaryLocations_merged { + get { + return ResourceManager.GetString("AssessmentSectionMergeHandler_MergeHydraulicBoundaryLocations_HydraulicBoundaryLo" + + "cations_merged", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Er zijn geen trajecten gevonden die samengevoegd kunnen worden.. /// public static string AssessmentSectionMerger_No_matching_AssessmentSections { Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx =================================================================== diff -u -re0476d8c340b412a22c14d0869888a84e0e4fe5f -raa2276eb72eb3bb6e4a69ebe05becdbf28a8356b --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision e0476d8c340b412a22c14d0869888a84e0e4fe5f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision aa2276eb72eb3bb6e4a69ebe05becdbf28a8356b) @@ -203,4 +203,7 @@ Alle hydraulische randvoorwaarden berekenen. + + Hydraulische belastingen zijn samengevoegd. + \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Merge/AssessmentSectionMergeHandlerTest.cs =================================================================== diff -u -r87c8156d44cba5489f6128da6b31260a4bace1d5 -raa2276eb72eb3bb6e4a69ebe05becdbf28a8356b --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Merge/AssessmentSectionMergeHandlerTest.cs (.../AssessmentSectionMergeHandlerTest.cs) (revision 87c8156d44cba5489f6128da6b31260a4bace1d5) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Merge/AssessmentSectionMergeHandlerTest.cs (.../AssessmentSectionMergeHandlerTest.cs) (revision aa2276eb72eb3bb6e4a69ebe05becdbf28a8356b) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Gui.Commands; +using Core.Common.TestUtil; using Core.Common.Util.Extensions; using NUnit.Framework; using Rhino.Mocks; @@ -150,6 +151,29 @@ } [Test] + public void PerformMerge_WithAllData_LogMessage() + { + // Setup + var mocks = new MockRepository(); + var viewCommands = mocks.Stub(); + mocks.ReplayAll(); + + var handler = new AssessmentSectionMergeHandler(viewCommands); + + // Call + Action call = () => handler.PerformMerge(new AssessmentSection(AssessmentSectionComposition.Dike), + new AssessmentSection(AssessmentSectionComposition.Dike), + Enumerable.Empty()); + + // Assert + TestHelper.AssertLogMessagesWithLevelAreGenerated(call, new[] + { + new Tuple("Hydraulische belastingen zijn samengevoegd.", LogLevelConstant.Info) + }); + mocks.VerifyAll(); + } + + [Test] [TestCaseSource(nameof(GetCalculationsFuncs))] public void GivenAssessmentSectionWithHydraulicBoundaryLocationCalculations_WhenTargetAssessmentSectionHasOutput_ThenCalculationsNotChanged( Func> getCalculationsFunc)