Hi,
I have a few suggestions for writing tests in ClearTk. First, I suggest to adopt the given-when-then style to name tests. In this style, 'given' represent the current state of ClearTK, 'when' specifies the interaction with ClearTK, and finally 'then' indicate the expectation of running the test. For more information, please refer to
this. As an example, consider the testMutualInformationFeatureSelection in MutualInformationTest class. The name of this test can be something like this: givenInstancesWhenOrderingFeatureBasedOnMutualInformationThenTheOrderOfFeaturesIsInDescending(), long name but more clear :)
Second, I like to suggest adding
Mockito dependency to the maven file in the test scope. This tool mainly useful to create stub. For more information, please refer to
this. I am not suggesting to use BDD instead of TDD, however, I believe the Mockito can make many tests easier to write.
Thanks,
Majid
/*******************************************
* Majid Laali, Ph.D. Candidate,
* Computer Science & Software Engineering Department
* Concordia University
*******************************************/