Creating parameterised tests in xUnit with [InlineData], [ClassData], and [MemberData]

added by DotNetKicks
11/7/2017 12:09:23 PM

2 Kicks, 109 Views

In this post I provide an introduction to creating parmeterised tests using xUnit's [Theory] tests, and how you can pass data into your test methods. I'll cover the common [InlineData] attribute, and also the [ClassData] and [MemberData] attributes. In the next post, I'll show how to load data in other ways by creating your own [DataAttribute].


0 comments