Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputStepSizeExtensionsTest.cs =================================================================== diff -u -r0ee0d86b58275264171be7f91afa87b7edd0d67a -rca0345432ea951a80e3e956a8d485840c0897e1d --- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputStepSizeExtensionsTest.cs (.../WaveConditionsInputStepSizeExtensionsTest.cs) (revision 0ee0d86b58275264171be7f91afa87b7edd0d67a) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputStepSizeExtensionsTest.cs (.../WaveConditionsInputStepSizeExtensionsTest.cs) (revision ca0345432ea951a80e3e956a8d485840c0897e1d) @@ -20,6 +20,7 @@ // All rights reserved. using System.ComponentModel; +using Core.Common.TestUtil; using NUnit.Framework; namespace Ringtoets.Revetment.Data.Test @@ -43,12 +44,16 @@ [Test] public void AsValue_InvalidValue_ThrowsInvalidEnumArgumentException() { + // Setup + const int invalidValue = 4; + // Call - TestDelegate test = () => ((WaveConditionsInputStepSize) 4).AsValue(); + TestDelegate call = () => ((WaveConditionsInputStepSize) invalidValue).AsValue(); // Assert - string parameter = Assert.Throws(test).ParamName; - Assert.AreEqual("stepSize", parameter); + string expectedMessage = $"The value of argument 'stepSize' ({invalidValue}) is invalid for Enum type '{nameof(WaveConditionsInputStepSize)}'."; + string parameterName = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage).ParamName; + Assert.AreEqual("stepSize", parameterName); } } } \ No newline at end of file