Combinatorial data in xUnit.NET?

I am switching from MbUnit to xUnit and I am trying to find equivalent attributes (or approach) to MbUnit [CombinatorialJoin] and [Column] .

For example, when testing the general behavior of a function with several logical parameters [Column] very easy to check permutations:

 public void TestMethodWithTooManyOptions([Column(true, false)] bool dispose, [Column(true, false)] bool useDestinationStream, [Column(true, false)] bool useCorruptedSource, [Column(true, false)] bool loadTwice, [Column(true, false)] bool useSourceStream) { 

[CombinatorialJoin] , [SequentialJoin] , [PairwiseJoin] affect the permutation of columns (or rows).

+5
source share
2 answers

Perhaps this is the correct answer ...

https://github.com/AArnott/Xunit.Combinatorial

+3
source

If you use ValidTests, you can create the xUnit.net Fact and CombinationApprovals.VerifyAllCombinations method to run combinatorial tests.

This is not the same as using an attribute, but it is the best solution I have found in xUnit.

+1
source

Source: https://habr.com/ru/post/1202248/


All Articles