Skip to content

Commit

Permalink
Move NUnit4 paragraph under table. (#738)
Browse files Browse the repository at this point in the history
* Move NUnit4 paragraph under table.

The table belongs to the method that have 'params' overloads removed.

* Added Assume.That
  • Loading branch information
manfred-brands authored May 7, 2024
1 parent bb2ebd1 commit 1649f59
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions documentation/NUnit2050.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ This analyzer needs to be run when still building against NUnit3 as otherwise yo
When usages of the new methods with `params` are detected, the associated CodeFix will convert the format specification
into an interpolated string.

Once you moved to NUnit4 the analyzer has some limited functionality as there are a few
cases where your NUnit3 code will compile on NUnit4, but not the way you want it.
Here what you think are parameters to a format specification are actually interpreted as
the _actual_ and _constraint_ expression strings.
Unfortunately you only find that out when the test fails, which could be never.

The affected methods are:

```csharp
Expand All @@ -48,6 +42,13 @@ Assert.That
Assume.That
```

Once you moved to NUnit4 the analyzer has some limited functionality as there are a few
cases with `Assert.That` or `Assume.That` where your NUnit3 code will compile on NUnit4,
but not the way you want it.
Here what you think are parameters to a format specification are actually interpreted as
the _actual_ and _constraint_ expression strings.
Unfortunately you only find that out when the test fails, which could be never.

## How to fix violations

The following code, valid in NUnit3:
Expand Down

0 comments on commit 1649f59

Please sign in to comment.