Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#2880) Update NUnit dependencies to v3 #2883

Merged
merged 7 commits into from
Nov 17, 2022

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented Nov 2, 2022

Description Of Changes

This pull request updates any references to use NUnit v3 as well
as updating the code we have in testing to the equivalent in
the new version of NUnit.
Additionally, it makes some maintenance commits to helping with working on the codebase and unit tests by making several tests be categorized so they can be more easily detected in the Visual Studio test runner.

Motivation and Context

Modernizing

Testing

  1. Run both the unit and integration tests.

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)
  • PowerShell code changes.
  • Tests
  • [ ]

Related Issue

Fixes #2880

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed.
  • PowerShell v2 compatibility checked.

@AdmiringWorm AdmiringWorm self-assigned this Nov 2, 2022
@choco-bot
Copy link

Task linked: PROJ-357 Uplift NUnit

@AdmiringWorm AdmiringWorm marked this pull request as ready for review November 16, 2022 16:53
This commit updates any references to use NUnit v3 as well
as updating the code we have in testing to the equivalent in
the new version of NUnit.
This commit updates the tests that tests different commands and
any tests that are considered integration tests to add the correct
category for these tests.
This commit updates the attribute ConcernFor to inherit from the
NUnit CategoryAttribute so usage of this attribute will categorize
the tests that makes use of it with the appropriate category.
This commit updates a test that verifies that a test that reports
an exception is running under the English culture.
This is done so the test won't fail when it is running on
non-english cultures just because the messaging would be
different.
This commit updates the assertions made to detect whether a
file or directory exists or not to instead of assertion on true/false
it instead asserts directly using NUnit v3 assertion classes.

This is done so if the test fails there will be more information
outputted of the failure than just telling whether something
was true or false.
@gep13 gep13 force-pushed the upgrade-nunit-to-3.x branch from e672b0b to 0368d37 Compare November 17, 2022 09:04
gep13
gep13 previously approved these changes Nov 17, 2022
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13
Copy link
Member

gep13 commented Nov 17, 2022

@AdmiringWorm the failing builds here are due to a new feature that was added into Chocolatey.Cake.Recipe. That shouldn't stop this work getting merged in though, since there is some follow up work that needs to be done after this merged, so assuming that the Windows builds succeeds, let's get this merged in, and we can ship a new version of Chocolatey.Cake.Recipe to address the failing builds on Posix.

As we have added new dependencies to the build, i.e. we have changed t
NUnit v3 which includes some additional assemblies in the output
folder, we need to ensure that these are not included in what is being
ILMerge'd into the choco.exe.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13 gep13 merged commit 924a785 into chocolatey:develop Nov 17, 2022
@gep13
Copy link
Member

gep13 commented Nov 17, 2022

@AdmiringWorm thank you for taking the time to get this updated!

@AdmiringWorm AdmiringWorm deleted the upgrade-nunit-to-3.x branch November 17, 2022 14:18
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.

Upgrade to target version 3.13.3 of NUnit
3 participants