xUnit.net

From Wikipedia, the free encyclopedia

Template:Short description Script error: No such module "about".

Page Module:Infobox/styles.css has no content.

xUnit.net
[[Programmer|Original authorTemplate:Pluralize from text]]James Newkirk, Brad Wilson
[[Programmer|DeveloperTemplate:Pluralize from text]]Microsoft, Outercurve Foundation, .NET Foundation
Template:Infobox software/simple
Written inC#
Operating systemWindows, macOS, Linux
Platform.NET Framework, .NET Core, Mono
TypeUnit testing tool
LicenseApache License 2.0
Websitexunit.net
Repositorygithub.com/xunit/xunit/

Script error: No such module "Check for conflicting parameters".

xUnit.net is a free and open-source unit testing tool for the .NET Framework, written by the original author of NUnit. The software can also be used with .NET Core and [2] Mono.

It is licensed under Apache License 2.0, and the source code is available on GitHub.[3] xUnit.net works with Xamarin, ReSharper, CodeRush, and TestDriven.NET.[4] It is authored by James Newkirk and Brad Wilson.[5]

Example

Example of an xUnit.net test fixture:

using Xunit;

public class MyTests
{
    [Fact]
    public void MyTest()
    {
        Assert.Equal(4, 2 + 2);
    }
}

After you compile the test, run it in your console:

C:\MyTests\bin\Debug>xunit.console MyTestLibrary.dll
xUnit.net console test runner (64-bit .NET 2.0.50727.0)
Copyright (C) 2007-11 Microsoft Corporation.

xunit.dll:     Version 1.9.1.0
Test assembly: C:\MyTests\bin\Debug\MyTestLibrary.dll

1 total, 0 failed, 0 skipped, took 0.302 seconds

See also

Lua error in mw.title.lua at line 404: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

References

Page Template:Reflist/styles.css has no content.

  1. ^ Page Module:Citation/CS1/styles.css has no content."Releases · xunit/xunit". GitHub.
  2. ^ Page Module:Citation/CS1/styles.css has no content."How to Test ASP.NET Core Web API". InfoQ.
  3. ^ Page Module:Citation/CS1/styles.css has no content."About xUnit.net". GitHub. 4 November 2021.
  4. ^ Page Module:Citation/CS1/styles.css has no content.Kanjilal, Joydip (February 10, 2017). "How to work with xUnit.Net framework". InfoWorld.
  5. ^ Page Module:Citation/CS1/styles.css has no content."Leaving Microsoft". Brad Wilson.

Further reading

Template:Microsoft FOSS