Property data-driven unit tests

The lack of flexibility encountered when writing inline data-driven tests can be overcome through the use of property data-driven tests. Property data-driven unit tests are written in xUnit.net through the use of the MemberData and ClassData attributes. Using the two attributes, data theories can be created with data loaded from disparate data sources, such as files or databases.

Get C# and .NET Core Test Driven Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.