Creating strongly typed xUnit theory test data with TheoryData

added by DotNetKicks
11/21/2017 1:09:17 PM

2 Kicks, 291 Views

In a recent post I described the various ways you can pass data to xUnit theory tests using attributes such as [InlineData], [ClassData], or [MemberData]. For the latter two, you create a property, method or class that returns IEnumerable , where each object[] item contains the arguments for your theory test.