Creating a custom xUnit theory test DataAttribute to load data from JSON files

added by DotNetKicks
11/14/2017 12:49:29 PM

2 Kicks, 767 Views

In my last post, I described the various ways to pass data to an xUnit [Theory] test. These are: [InlineData] - Pass the data for the theory test method parameters as arguments to the attribute [ClassData] - Create a custom class that implements IEnumerable , and use this to return the test data [MemberData] - Create a static property or method that returns an IEnumerable and use it to supply the test data.


0 comments