Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs
===================================================================
diff -u -rcd7b72bcec3e2c60ad5de2fb54e0cd92d60c38c1 -r49cf783c59b933669fb20686fd9fdf23c51428e4
--- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs (.../RingtoetsContextMenuItemFactory.cs) (revision cd7b72bcec3e2c60ad5de2fb54e0cd92d60c38c1)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs (.../RingtoetsContextMenuItemFactory.cs) (revision 49cf783c59b933669fb20686fd9fdf23c51428e4)
@@ -378,27 +378,13 @@
/// Object responsible for inquiring the required data.
/// The action to perform when the foreshore profile is updated.
/// The created .
- /// Thrown when any of the input parameters is null.
public static StrictContextMenuItem CreateUpdateForshoreProfileOfCalculationItem(
ICalculation calculation,
IInquiryHelper inquiryHelper,
Action> updateAction)
where TCalculationInput : ICalculationInput, IHasForeshoreProfile
{
- if (calculation == null)
- {
- throw new ArgumentNullException(nameof(calculation));
- }
- if (inquiryHelper == null)
- {
- throw new ArgumentNullException(nameof(inquiryHelper));
- }
- if (updateAction == null)
- {
- throw new ArgumentNullException(nameof(updateAction));
- }
-
bool hasForeshoreProfile = calculation.InputParameters.ForeshoreProfile != null;
string toolTipMessage = hasForeshoreProfile
? Resources.CreateUpdateForshoreProfileOfCalculationItem_Update_calculation_with_ForeshoreProfile_ToolTip
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs
===================================================================
diff -u -rcd7b72bcec3e2c60ad5de2fb54e0cd92d60c38c1 -r49cf783c59b933669fb20686fd9fdf23c51428e4
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs (.../RingtoetsContextMenuItemFactoryTest.cs) (revision cd7b72bcec3e2c60ad5de2fb54e0cd92d60c38c1)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs (.../RingtoetsContextMenuItemFactoryTest.cs) (revision 49cf783c59b933669fb20686fd9fdf23c51428e4)
@@ -599,66 +599,6 @@
#region CreateUpdateForshoreProfileOfCalculationItem
[Test]
- public void CreateUpdateForshoreProfileOfCalculationItem_CalculationNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var inquiryHelper = mocks.StrictMock();
- mocks.ReplayAll();
-
- ICalculation calculation = null;
-
- // Call
- TestDelegate call = () => RingtoetsContextMenuItemFactory.CreateUpdateForshoreProfileOfCalculationItem(
- calculation,
- inquiryHelper, c => {});
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("calculation", paramName);
- mocks.VerifyAll();
- }
-
- [Test]
- public void CreateUpdateForshoreProfileOfCalculationItem_IInquiryHelperNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var calculation = mocks.StrictMock>();
- mocks.ReplayAll();
-
- // Call
- TestDelegate call = () => RingtoetsContextMenuItemFactory.CreateUpdateForshoreProfileOfCalculationItem(
- calculation,
- null, null);
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("inquiryHelper", paramName);
- mocks.VerifyAll();
- }
-
- [Test]
- public void CreateUpdateForshoreProfileOfCalculationItem_ActionNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var calculation = mocks.StrictMock>();
- var inquiryHelper = mocks.StrictMock();
- mocks.ReplayAll();
-
- // Call
- TestDelegate call = () => RingtoetsContextMenuItemFactory.CreateUpdateForshoreProfileOfCalculationItem(
- calculation,
- inquiryHelper, null);
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("updateAction", paramName);
- mocks.VerifyAll();
- }
-
- [Test]
public void CreateUpdateForshoreProfileOfCalculationItem_WithoutForeshoreProfile_CreatesEnabledItem()
{
// Setup
@@ -705,7 +645,7 @@
}
[Test]
- public void CreateUpdateForshoreProfileOfCalculationItem_WithoutCalculationOutputPerformClick_PerformesAction()
+ public void CreateUpdateForshoreProfileOfCalculationItem_WithoutCalculationOutputPerformClick_PerformsAction()
{
// Setup
var mocks = new MockRepository();