Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to customize xunit input

using Xunit;

public class CalculatorTests
{
    [Theory]
    [InlineData(1, -1, true)]
    [InlineData(1, -2, false)]
    public void SumIsZero(int val1, int val2, bool expected)
    {
      Assert.True(((val1 + val2) == 0) == expected);
    }
}
Source by andrewlock.net #
 
PREVIOUS NEXT
Tagged: #customize #xunit #input
ADD COMMENT
Topic
Name
6+8 =