Skip to content

Commit

Permalink
Ensure all throws of NotImplementedException contain messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Oct 26, 2023
1 parent 8a84fdb commit e139d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xunit.core/Record.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static Exception Exception(Func<object> testCode)
/// <summary/>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("You must call Record.ExceptionAsync (and await the result) when testing async code.", true)]
public static Exception Exception(Func<Task> testCode) { throw new NotImplementedException(); }
public static Exception Exception(Func<Task> testCode) { throw new NotImplementedException("You must call Record.ExceptionAsync (and await the result) when testing async code."); }

/// <summary>
/// Records any exception which is thrown by the given task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ IEnumerable<IParameterInfo> IMethodInfo.GetParameters()

IMethodInfo IMethodInfo.MakeGenericMethod(params ITypeInfo[] typeArguments)
{
throw new NotImplementedException();
throw new NotImplementedException("This API is new for v2 and should never be called for v1");
}

// ITypeInfo
Expand Down

0 comments on commit e139d77

Please sign in to comment.