Skip to content

Commit

Permalink
Merge pull request #733 from maettu-this/maettu-this_missing-full-sto…
Browse files Browse the repository at this point in the history
…ps-added

Missing full stops added to NUnit2050
  • Loading branch information
mikkelbu authored Apr 23, 2024
2 parents 07d8594 + dfe15f5 commit 37ee849
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions documentation/NUnit2050.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ to include the expression passed in for the _actual_ and _constraint_ parameters
These are parameters automatically supplied by the compiler.

To facilitate this, we needed to drop support for
[composite formatting](https://learn.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting)
[composite formatting](https://learn.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting).
All NUnit4 asserts only allow a single _message_ parameter which can be either a simple string literal
or a [interpolatable string](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/string-interpolation)
or a [interpolatable string](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/string-interpolation).

This analyzer needs to be run when still building against NUnit3 as otherwise your code won't compile.
When usages of the new methods with `params` are detected, the associated CodeFix will convert the format specification
Expand Down Expand Up @@ -111,7 +111,7 @@ When using NUnit3, this results in:
But when using NUnit4, we get:

```plaintext
Message:
Message:
Expected '{0}', but got: '{1}'
Assert.That(NUnit 3, NUnit 4)
String lengths are both 7. Strings differ at index 6.
Expand All @@ -134,7 +134,7 @@ public void TestMessage(string actual, string expected)
and the output:

```plaintext
Message:
Message:
Expected 'NUnit 3', but got: 'NUnit 4'
Assert.That(actual, Is.EqualTo(expected))
String lengths are both 7. Strings differ at index 6.
Expand Down

0 comments on commit 37ee849

Please sign in to comment.