Skip to content

Commit

Permalink
Add back old EqualTo(object) overloads for backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
manfred-brands committed Dec 20, 2024
1 parent caf4a4e commit 1119a98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@ public Constraint Matches<TActual>(Predicate<TActual> predicate)

#region EqualTo

/// <summary>
/// Returns a constraint that tests two items for equality
/// </summary>
public EqualConstraint EqualTo(object? expected)
{
return Append(new EqualConstraint(expected));
}

/// <summary>
/// Returns a constraint that tests two items for equality
/// </summary>
Expand Down
8 changes: 8 additions & 0 deletions src/NUnitFramework/framework/Is.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ public abstract class Is

#region EqualTo

/// <summary>
/// Returns a constraint that tests two items for equality
/// </summary>
public static EqualConstraint EqualTo(object? expected)
{
return new EqualConstraint(expected);
}

/// <summary>
/// Returns a constraint that tests two items for equality
/// </summary>
Expand Down

0 comments on commit 1119a98

Please sign in to comment.