Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TUnit.Mocks/Arguments/Arg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public static class Arg
public static Arg<T> Is<T>(Func<T?, bool> predicate) => new(new PredicateMatcher<T>(predicate));

/// <summary>Matches only when the argument is null.</summary>
public static Arg<T> IsNull<T>() where T : class => new(new NullMatcher<T>());
public static Arg<T> IsNull<T>() where T : class? => new(new NullMatcher<T>());

/// <summary>Matches only when the argument is not null.</summary>
public static Arg<T> IsNotNull<T>() where T : class => new(new NotNullMatcher<T>());
public static Arg<T> IsNotNull<T>() where T : class? => new(new NotNullMatcher<T>());

/// <summary>Matches a string against a regular expression pattern.</summary>
public static Arg<string> Matches(string pattern) => new(new RegexMatcher(pattern));
Expand Down
Loading