Skip to content

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Nov 27, 2023

Add FrameworkSpecs for NUnit4 and mention support in documentation and package information.

Fixes #2482

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

@github-actions
Copy link

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.8
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

coveralls commented Nov 27, 2023

Pull Request Test Coverage Report for Build 7016904197

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.475%

Totals Coverage Status
Change from base Build 6941628243: 0.0%
Covered Lines: 11742
Relevant Lines: 11926

💛 - Coveralls

@vbreuss vbreuss marked this pull request as ready for review November 27, 2023 13:52
@dennisdoomen
Copy link
Member

Since it seems to contain some breaking changes, supporting both Nunit 3 and 4 makes sense to me.

Exception exception = act.Should().Throw<Exception>().Which;
exception.GetType()
.FullName.Should()
.ContainEquivalentOf("NUnit.Framework.AssertionException");
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Are you sure this is the right one? I was also expecting a different version of the NUnitTestFramework type. Or are the exception types the same?

Copy link
Member

Choose a reason for hiding this comment

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

Our current NUnitTestFramework also matches NUnit4, so no changes are needed on our side.

NUnit.Framework.AssertionException

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Test adapter also remained unchanged, according to the release notes:
image

@jnyrup
Copy link
Member

jnyrup commented Nov 28, 2023

NUnit4 needs to added here

var projects = new[]
{
Solution.TestFrameworks.MSpec_Specs,
Solution.TestFrameworks.MSTestV2_Specs,
Solution.TestFrameworks.NUnit3_Specs,
Solution.TestFrameworks.XUnit2_Specs
};

@jnyrup
Copy link
Member

jnyrup commented Nov 28, 2023

The failing build is because NUnit4.Specs needs to be build in debug for the CI solution configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for NUnit4

4 participants