Monday, February 10, 2020

a Theory instead of a Fact in an XUnit test

What I have here is probably bad. Instead when you have attributes like so decorating a test:

[Theory]
[MemberData(nameof(Data))]

 
 

This means that the test is not DAMP and that it will be rerun several times over for variations in a collection. "Data" has to be defined somewhere like so:

public static IEnumerable<object[]> Data =>

No comments:

Post a Comment