This section provides an overview of what xunit is, and why a developer might want to use it.
It should also mention any large subjects within xunit, and link out to the related topics. Since the Documentation for xunit is new, you may need to create initial versions of those related topics.
using Xunit;
namespace MyFirstUnitTests
{
public class TestClass
{
[Fact]
public void PassingTest()
{
Assert.Equal(4, Add(2, 2));
}
[Fact]
public void FailingTest()
{
Assert.Equal(5, Add(2, 2));
}
int Add(int x, int y)
{
return x + y;
}
}
}
Getting started with xUnit.net, on Platform: