Code Monkey home page Code Monkey logo

nunit.analyzers's Introduction

NUnit Analyzers

Build status GitHub Actions build status NuGet Version and Downloads count MyGet Feed

This is a suite of analyzers that target the NUnit testing framework. Right now, the code is separate from the NUnit framework, so if you want to try out the analyzers you'll need to download the analyzers separately as a nuget package. In the future the analyzers may be added as part of the NUnit framework package but that hasn't been done yet.

Download

The latest stable release of the NUnit Analyzers is available on NuGet or can be downloaded from GitHub. Note that for Visual Studio 2017 one must use versions below 3.0 - note that these versions are no longer updated, so version 2.10.0 is the last version that works in Visual Studio 2017. Version 3.0 and upwards require Visual Studio 2019 (version 16.3) or newer, these versions also enables supression of compiler errors such as errors arising from nullable reference types.

Prerelease nuget packages can be found on MyGet. Please try out the package and report bugs and feature requests.

Analyzers

The full list of analyzers can be found in the documentation.

Below we give two examples of analyzers. One will look for methods with the [TestCase] attribute and makes sure the argument values are correct for the types of the method parameters along with the ExpectedResult value if it is provided.

testcase analyzers

The other analyzer looks for classic model assertions (e.g. Assert.AreEqual(), Assert.IsTrue(), etc.). This analyzer contains a fixer that can translate the classic model assertions into constraint model assertions (Assert.That()).

classic model assertions analyzers

Which version works with Unity Test Framework

If your Unity project is made by Unity under 2021.2, then use NUnit.Analyzers v2.x.

If your Unity project is made by Unity 2021.2 or later, then use NUnit.Analyzers v3.3 (v3.4 or later of the analyzers does not work with Unity).

You should use an analyzer built with the same version of Microsoft.CodeAnalysis.CSharp as the one embedded in the Unity Editor.

License

NUnit analyzers are Open Source software and released under the MIT license, which allow the use of the analyzers in free and commercial applications and libraries without restrictions.

Contributing

There are several ways to contribute to this project. One can try things out, report bugs, propose improvements and new functionality, work on issues (especially the issues marked with the labels help wanted and Good First Issue), and in general join in the conversations. See Contributing for more information.

This project has adopted the Code of Conduct from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4. See the Code of Conduct for more information.

Contributors

NUnit.Analyzers was created by Jason Bock. A complete list of contributors can be found on the GitHub contributors page.

nunit.analyzers's People

Contributors

mikkelbu avatar manfred-brands avatar dreamescaper avatar seankilleen avatar dependabot[bot] avatar jasonbock avatar johanlarsson avatar jnm2 avatar mgyongyosi avatar 304notmodified avatar stevenaw avatar verdie-g avatar andrewimcclement avatar aolszowka avatar bartleby2718 avatar matode avatar maettu-this avatar get-me-power avatar henryzhang-zhy avatar rprouse avatar oskar avatar maximrouiller avatar lahma avatar laniusexcubitor avatar nowsprinting avatar jcurl avatar 333fred avatar corniel avatar collinalpert avatar antash avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.