junit-team/junit — pull request #724 by avandeursen (2013-08-21 20:33:42+00:00)
Title: Refactoring of TestClassTest, and adding 2 new test cases.

This pull requests contains some improvements to the test cases for `org.junit.runners.model.TestClass`.

These test cases are included in the only file changed by this pull request, `org.junit.tests.running.classes.TestClassTest`.

The test cases here make use of static classes, which act as the fixtures for this test class.

One of the obvious improvements was to remove the static class `ManyMethods`, as it was not used in any test method.

Furthermore, when closely examining the full test class, I noticed that it was fairly incomplete. For example, the (fairly tricky) methods `getAnnotatedFieldValues` and `getAnnotatedMethodValues` were not tested, which are now provided.

The new tests make use of two new static fixture classes. These each contain two fields / methods (one matching, and one not matching the criterion) to exercise all the branches in the methods under test.

This class under test was originally mainly [tested indirectly](http://xunitpatterns.com/Obscure%20Test.html#Indirect Testing), with incomplete branch coverage. The new test cases serve to better document the behavior of this class.