lundi 22 février 2016

Using random data in XUnit theories

I would like to use random data ranges in some of my XUnit test theories.

For example, I have a test that expects the same result for for 0, 1 and any integer smaller than n, so I would like to have 3 theories, one for each case. If possible, I would like the case 2 to N to be clearly communicated in my code.

Somehow what I am looking resembles this attribute, but applying ranges into my randomness.

Is there any standard X-Unit approach to this problem? Or should I go for implementing my custom Xunit.Extensions.DataAttribute.

Thanks,




Aucun commentaire:

Enregistrer un commentaire