When we have multiple values for which we would like to test a given method should we loop through the values in a single test?
Or is it incorrect has in case of failure it might be harder to identify the cause?
Something like this:
testSomething(){
List myValues = {'value1', 'value2', 'value3', ...}
for(value: myValues){
assertTrue(Something(Value))
}
}
Aucun commentaire:
Enregistrer un commentaire