Closed kimsey0 closed 9 months ago
I wonder why ClassData
is better than MemberData
. I haven't read the whole document.
Either of these are tasked with providing all test case inputs, so there isn't room to create combinations of values as this library does.
If you were thinking of something like expanding CombinatorialValuesAttribute
to allow the values to come from a member or class though, that might be something new and doable.
I just like the strongly typed TheoryData
class which allows me to have a TheoryData<int, string, Guid>
instead of an IEnumerable<object[]>
. I have only used it with ClassData
, not with MemberData
, but now that I re-read Andrew Lock's articles, I see that it can actually also be used with MemberData
.
In any case, you're right that TheoryData
providing all test case inputs means it doesn't make sense for providing values for one parameter, as CombinatorialValuesAttribute
does. I didn't think this issue through, so I'll close it.
It would be nice to have support for ClassData, specifically for use with the typed TheoryData class. I imagine it would take the form of a new
CombinatorialClassDataAttribute
.