Closed occupant23 closed 5 months ago
Another/better idea would be to extend the existing DataSet annotation and add a randomSets parameter. This could avoid some problems when we would uses 2 different annotations.
@oomelianchuk Code approved and merged. Please go on and create the documentation for this feature.
Documentation of this feature is created and committed to the develop branch of the neodymium-library.wiki project with the commit message " #153 documentation for randomSets parameter of DataSet annotation"
@oomelianchuk: Please revisit the RandomnessOfDataSets
test I just saw that the method test2
will fail if the randomly created order of the datasets will be the same as in the data file but this a very likely event. Let us chat about possible solutions before implementation.
@oomelianchuk While rechecking the RandomBrowser
annotation I rethought this ticket and found that we are missing some combinations and have some strange edge cases with the current implementation.
I would like to support such a case
@DataSet(1)
@DataSet(3)
@DataSet(4)
@DataSet(7)
@DataSet(11)
@DataSet(12)
@RandomDataSets(2)
public class MyTest() {
public void test1() {
// do something
}
@DataSet(2)
@DataSet(5)
public void test2() {
// do something different
}
@RandomDataSets(3)
public void test3() {
// do something completely different
}
}
I think we could achieve suche a behavior when we adjust the current implementation but we would have to explain a lot more the documentation. And would have to cover/document edge cases like double definition of random number etc.
Please revisit the issue (new branch for development, new test cases etc.).
@georgkunze: Please test this feature and check the documentation (should be available in the wikis dev branch).
@occupant23 Test done. Checked also the documentation
Rechecked again and closed
It would be nice to have an annotation that selects one or more data sets out of all available data sets.
e.G.:
value = 1
would mean choose one set randomly. If the more data sets than available should be picked randomly an exception should be raised.