From 24172bb7a203db3be4c49bea392fb73b1d7917b0 Mon Sep 17 00:00:00 2001 From: Manfred Brands Date: Fri, 3 May 2024 15:26:24 +0800 Subject: [PATCH 1/2] Move NUnit4 paragraph under table. The table belongs to the method that have 'params' overloads removed. --- documentation/NUnit2050.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/NUnit2050.md b/documentation/NUnit2050.md index ec5deefd..54b2b50c 100644 --- a/documentation/NUnit2050.md +++ b/documentation/NUnit2050.md @@ -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 @@ -48,6 +42,12 @@ Assert.That Assume.That ``` +Once you moved to NUnit4 the analyzer has some limited functionality as there are a few +cases with `Assert.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: From 8db2a3232bed1f596fd243294fbce72533576709 Mon Sep 17 00:00:00 2001 From: Manfred Brands Date: Sat, 4 May 2024 07:55:48 +0800 Subject: [PATCH 2/2] Added Assume.That --- documentation/NUnit2050.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/NUnit2050.md b/documentation/NUnit2050.md index 54b2b50c..91d521bf 100644 --- a/documentation/NUnit2050.md +++ b/documentation/NUnit2050.md @@ -43,7 +43,8 @@ Assume.That ``` Once you moved to NUnit4 the analyzer has some limited functionality as there are a few -cases with `Assert.That` where your NUnit3 code will compile on NUnit4, but not the way you want it. +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.