Commit 8279b01
committed
test: cast Assert.DoesNotThrow / Throws delegates to (Action) for NUnit 4
NUnit 4's Assert.DoesNotThrow / Assert.Throws<T> resolve delegate arguments
against multiple overloads (Action, TestDelegate, AsyncTestDelegate). A bare
() => lambda triggers CS0121 overload ambiguity once TrakHound#239 lands the NUnit 4
upgrade. The (Action) cast disambiguates unambiguously in both NUnit 3 and 4,
so the wrap is safe to land on this branch before TrakHound#239 merges.
Fixes cross-PR bug class discovered on integration/up-to-pr-249 build (158
errors, 112 CS0121 across 9 test files on 7 PRs). Per-PR fix — each affected
PR wraps its own new test sites so the class stays clean across the train.1 parent dacdc02 commit 8279b01
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments