Index: Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs =================================================================== diff -u -rfa493fef4f3f244664392c28896afb2052596898 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs (.../ActivityProgressDialogRunner.cs) (revision fa493fef4f3f244664392c28896afb2052596898) +++ Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs (.../ActivityProgressDialogRunner.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -43,9 +43,9 @@ /// /// Runs a sequence of activities of type while showing progress in a dialog. /// + /// The activity type. /// The dialog parent for which the progress dialog should be shown on top. /// The activities to be executed. - /// The activity type. public static void Run(IWin32Window dialogParent, IList activities) where TActivity : Activity { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculation.cs =================================================================== diff -u -r0a94ed42cb943659d68be2ce6fb430f8f29fc3f3 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculation.cs (.../ICalculation.cs) (revision 0a94ed42cb943659d68be2ce6fb430f8f29fc3f3) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculation.cs (.../ICalculation.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -29,11 +29,6 @@ public interface ICalculation : ICalculationBase, ICommentable { /// - /// Gets or sets the name of this calculation item. - /// - new string Name { get; set; } - - /// /// Gets a value indicating whether or not this calculation item contains calculation output. /// bool HasOutput { get; } Index: Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculationBase.cs =================================================================== diff -u -rfff12e249602fb700b2854c14a3b7cdd0b73c023 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculationBase.cs (.../ICalculationBase.cs) (revision fff12e249602fb700b2854c14a3b7cdd0b73c023) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ICalculationBase.cs (.../ICalculationBase.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -31,6 +31,6 @@ /// /// Gets or sets the name of this calculation item. /// - string Name { get; } + string Name { get; set; } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs =================================================================== diff -u -r36b6f1f7c1ddf585689512eb61256d41a1e0ca64 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision 36b6f1f7c1ddf585689512eb61256d41a1e0ca64) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -77,11 +77,11 @@ /// /// Creates a object for a calculation context of the type . /// + /// The type of calculation context to create a object for. /// The icon of the . /// The function for obtaining the child node objects. /// The function for obtaining the context menu strip. /// The action to perform on removing a node. - /// The type of calculation context to create a object for. /// A object. public static TreeNodeInfo CreateCalculationContextTreeNodeInfo( Bitmap icon, @@ -110,13 +110,13 @@ } /// - /// Creates a object for a failure mechanism context of the type . + /// Creates a object for a failure mechanism context of the type . /// + /// The type of failure mechanism context to create a object for. /// The function for obtaining the child node objects when is true. /// The function for obtaining the child node objects when is false. /// The function for obtaining the context menu strip when is true. /// The function for obtaining the context menu strip when is false. - /// The type of failure mechanism context to create a object for. /// A object. public static TreeNodeInfo CreateFailureMechanismContextTreeNodeInfo( Func enabledChildNodeObjects, Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsFailureMechanismContext.cs =================================================================== diff -u -r86c5aff166a7a2822ac8d77be371249ee3a155b6 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsFailureMechanismContext.cs (.../GrassCoverErosionInwardsFailureMechanismContext.cs) (revision 86c5aff166a7a2822ac8d77be371249ee3a155b6) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsFailureMechanismContext.cs (.../GrassCoverErosionInwardsFailureMechanismContext.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -34,9 +34,9 @@ /// /// Initializes a new instance of the class. /// - /// The failure mechanism. - /// The parent of . - /// Thrown when or are null. + /// The instance wrapped by this context object. + /// The assessment section which the calculation belongs to. + /// Thrown when or is null. public GrassCoverErosionInwardsFailureMechanismContext(GrassCoverErosionInwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(failureMechanism, assessmentSection) {} } Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsInputContext.cs =================================================================== diff -u -rb1a215180352084c8f320439c1893c639917f338 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsInputContext.cs (.../GrassCoverErosionInwardsInputContext.cs) (revision b1a215180352084c8f320439c1893c639917f338) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/GrassCoverErosionInwardsInputContext.cs (.../GrassCoverErosionInwardsInputContext.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -27,13 +27,17 @@ namespace Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects { + /// + /// Presentation object for all data required to configure an instance of + /// in order to be able to configure grass cover erosion inwards calculations. + /// public class GrassCoverErosionInwardsInputContext : GrassCoverErosionInwardsContext { /// - /// Creates a new instance of + /// Creates a new instance of . /// /// The grass cover erosion inwards input instance wrapped by this context object. - /// The calculation item the belongs to. + /// The calculation item which the belongs to. /// The failure mechanism which the context belongs to. /// The assessment section which the context belongs to. /// Thrown when any input parameter is null. Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -99,7 +99,7 @@ yield return RingtoetsTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( GrassCoverErosionInwardsFormsResources.CalculationIcon, CalculationContextChildNodeObjects, - CalculationContextContextmenuStrip, + CalculationContextContextMenuStrip, CalculationContextOnNodeRemoved); yield return new TreeNodeInfo> @@ -480,7 +480,7 @@ return childNodes.ToArray(); } - private ContextMenuStrip CalculationContextContextmenuStrip(GrassCoverErosionInwardsCalculationContext nodeData, object parentData, TreeViewControl treeViewControl) + private ContextMenuStrip CalculationContextContextMenuStrip(GrassCoverErosionInwardsCalculationContext nodeData, object parentData, TreeViewControl treeViewControl) { var builder = new RingtoetsContextMenuBuilder(Gui.Get(nodeData, treeViewControl)); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rb5dda9752bc1d895c6c88427ef75c1771b671808 -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision b5dda9752bc1d895c6c88427ef75c1771b671808) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -91,13 +91,12 @@ } [Test] - public void ChildNodeObjects_WithOutputData_ReturnOutputChildNode() + public void ChildNodeObjects_WithoutOutputData_ReturnCommentNodeInputNodeAndEmptyOutputChildNode() { var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput()); - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); var calculationContext = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock); @@ -316,131 +315,6 @@ } [Test] - public void ContextMenuStrip_CalculationWithoutOutput_ContextMenuItemClearOutputDisabled() - { - // Setup - var gui = mocks.StrictMock(); - var treeViewControlMock = mocks.StrictMock(); - - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); - - var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput()); - - var nodeData = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock); - - gui.Expect(cmp => cmp.Get(nodeData, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); - - mocks.ReplayAll(); - - plugin.Gui = gui; - - // Call - var contextMenu = info.ContextMenuStrip(nodeData, null, treeViewControlMock); - - // Assert - mocks.VerifyAll(); // Expect no calls on arguments - - TestHelper.AssertContextMenuStripContainsItem(contextMenu, 1, - RingtoetsCommonFormsResources.Clear_output, - RingtoetsCommonFormsResources.ClearOutput_No_output_to_clear, - RingtoetsCommonFormsResources.ClearIcon, - false); - } - - [Test] - public void ContextMenuStrip_CalculationWithOutput_ContextMenuItemClearOutputEnabled() - { - var gui = mocks.StrictMock(); - var treeViewControlMock = mocks.StrictMock(); - - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); - var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput()) - { - Output = new GrassCoverErosionInwardsOutput(0, 0, 0, 0, 0) - }; - - var nodeData = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock); - - gui.Expect(cmp => cmp.Get(nodeData, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); - - mocks.ReplayAll(); - - plugin.Gui = gui; - - // Call - var contextMenu = info.ContextMenuStrip(nodeData, null, treeViewControlMock); - - // Assert - mocks.VerifyAll(); // Expect no calls on arguments - - TestHelper.AssertContextMenuStripContainsItem(contextMenu, 1, - RingtoetsCommonFormsResources.Clear_output, - RingtoetsCommonFormsResources.Clear_output_ToolTip, - RingtoetsCommonFormsResources.ClearIcon); - } - - [Test] - [TestCase(true)] - [TestCase(false)] - public void GivenCalculationWithOutput_WhenClearingOutput_ThenCalculationClearedAndNotified(bool confirm) - { - // Given - var gui = mocks.DynamicMock(); - var observer = mocks.StrictMock(); - var treeViewControlMock = mocks.StrictMock(); - - var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); - var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput()); - - var calculationContext = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock); - - gui.Expect(cmp => cmp.Get(calculationContext, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); - - int clearOutputItemPosition = 1; - if (confirm) - { - observer.Expect(o => o.UpdateObserver()); - } - - mocks.ReplayAll(); - - plugin.Gui = gui; - - calculation.Output = new GrassCoverErosionInwardsOutput(0, 0, 0, 0, 0); - calculation.Attach(observer); - - var contextMenuAdapter = info.ContextMenuStrip(calculationContext, null, treeViewControlMock); - - string messageBoxText = null, messageBoxTitle = null; - DialogBoxHandler = (name, wnd) => - { - var messageBox = new MessageBoxTester(wnd); - messageBoxText = messageBox.Text; - messageBoxTitle = messageBox.Title; - if (confirm) - { - messageBox.ClickOk(); - } - else - { - messageBox.ClickCancel(); - } - }; - - // When - contextMenuAdapter.Items[clearOutputItemPosition].PerformClick(); - - // Then - Assert.AreNotEqual(confirm, calculation.HasOutput); - Assert.AreEqual("Bevestigen", messageBoxTitle); - Assert.AreEqual("Weet u zeker dat u de uitvoer van deze berekening wilt wissen?", messageBoxText); - mocks.VerifyAll(); - } - - [Test] public void GivenCalculationWithNonExistingFilePath_WhenCalculatingFromContextMenu_ThenOutputClearedLogMessagesAddedObserversNotNotified() { // Given Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationActivity.cs =================================================================== diff -u -re4613b1908b45105cdc5be7f3fb2f4fad823473e -ra84ad0dc60c583bc68f6c95c57f3499e16a5f3d1 --- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationActivity.cs (.../PipingCalculationActivity.cs) (revision e4613b1908b45105cdc5be7f3fb2f4fad823473e) +++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationActivity.cs (.../PipingCalculationActivity.cs) (revision a84ad0dc60c583bc68f6c95c57f3499e16a5f3d1) @@ -57,7 +57,7 @@ } LogMessages.Clear(); - calculation.ClearOutput();; + calculation.ClearOutput(); PipingCalculationService.Calculate(calculation); PipingSemiProbabilisticCalculationService.Calculate(calculation);