/// <summary> /// Asserts the specified test method throws an <see cref="ArgumentException">argument exception</see>. /// </summary> /// <typeparam name="TException">The <see cref="Type">type</see> of <see cref="ArgumentException"/> to expect.</typeparam> /// <param name="assert">The extended <see cref="Asserter"/>.</param> /// <param name="testMethod">The <see cref="Action"/> representing the test method.</param> /// <param name="paramName">The name of the parameter expected to throw an exception.</param> /// <returns>The <see cref="ExceptionAsserter{T}">asserted exception</see>.</returns> /// <include file="examples.xml" path="Types/Type[@name='ExceptionExtensions']/Member[@name='ThrowsForArgument`1']/example[1]" /> public static ExceptionAsserter <TException> ThrowsForArgument <TException>(this Asserter assert, Action testMethod, string paramName) where TException : ArgumentException => assert.ThrowsForArgument <TException>(testMethod, paramName, ExceptionOfTNotThrown, typeof(TException));