Skip to content

Commit

Permalink
Swap params (nsubstitute#369)
Browse files Browse the repository at this point in the history
Fixes expected vs actual arguments passed to `Assert.AreEqual`.
  • Loading branch information
jiimaho authored and dtchepak committed Mar 7, 2018
1 parent aca4675 commit bed6fac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/help/_posts/2010-02-03-return-for-any-args.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ A call can be configured to return a value regardless of the arguments passed us

{% examplecode csharp %}
calculator.Add(1, 2).ReturnsForAnyArgs(100);
Assert.AreEqual(calculator.Add(1, 2), 100);
Assert.AreEqual(calculator.Add(-7, 15), 100);
Assert.AreEqual(100, calculator.Add(1, 2));
Assert.AreEqual(100, calculator.Add(-7, 15));
{% endexamplecode %}

The same behaviour can also be achieved using [argument matchers](/help/argument-matchers): it is simply a shortcut for replacing each argument with `Arg.Any<T>()`.
Expand Down

0 comments on commit bed6fac

Please sign in to comment.