Skip to content

Clarify driver support for NUnit versions - #1857

Merged
CharliePoole merged 4 commits into
version3from
issue-1856a
Jul 27, 2026
Merged

Clarify driver support for NUnit versions#1857
CharliePoole merged 4 commits into
version3from
issue-1856a

Conversation

@CharliePoole

@CharliePoole CharliePoole commented Jul 27, 2026

Copy link
Copy Markdown
Member

This PR is part of #1856, fixing the version3 code so that it doesn't report support for NUnit versions past V4. We'll release this in conjunction with the framework V5 release.

@CharliePoole CharliePoole modified the milestones: 3.21.1, 3.22.1 Jul 27, 2026
@CharliePoole CharliePoole self-assigned this Jul 27, 2026
@CharliePoole
CharliePoole marked this pull request as draft July 27, 2026 08:33

@manfred-brands manfred-brands left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One simplification possible, otherwise fine.

{
return NUNIT_FRAMEWORK.Equals(reference.Name, StringComparison.OrdinalIgnoreCase) && reference.Version.Major >= 3;
int major = reference.Version.Major;
return NUNIT_FRAMEWORK.Equals(reference.Name, StringComparison.OrdinalIgnoreCase) && (major == 3 || major == 4);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new pattern syntax you can say:
major is 3 or 4
in that case you don't even need the extra local variable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I still don't have that syntax on the tip of my fingers. :-(

@CharliePoole
CharliePoole marked this pull request as ready for review July 27, 2026 15:51
@CharliePoole
CharliePoole merged commit 5a44c97 into version3 Jul 27, 2026
3 checks passed
@CharliePoole
CharliePoole deleted the issue-1856a branch July 27, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants