Optimize Descriptions
bechte opened this issue · comments
The descriptions of the contexts and tests are somehow ugly. They contain all enclosing classes like EnclosingClass$SomeInnerClass$AnotherInnerClass. This doesn't read very well in the test result pane of the IDE. As the contexts are added as children to the EnclosingClass, their name should be only the simple name, e.g. SomeInnerClass and AnotherInnerClass in the given example. The test result should look like this:
- EnclosingClass
- SomeInnerClass
- AnotherInnerClass
- SomeInnerClass
For this change a new factory method of the Description class is required. A pull request has already been started with the JUnit project, see junit-team/junit4#744.
This pull will be delivered with version 4.12 of the JUnit Framework and, therefore, this fix can be shipped first with the 4.12.0 version.
The new description are tested within a separate branch, see https://github.com/junit-team/junit/tree/immutable-description. Therefore, the release will be postponed for some time.
JUnit4 did not introduce the immutable descriptions.