Migrate Draw2D, GEF & Zest JUnit Tests from 3 to 4 #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change migrates all test cases to the latest JUnit version. With JUnit 4, annotations are used to control the execution flow. Given that the naming convention in JUnit 3 is rather fixed, a large chunk of this adaptation could be done automatically.
Normally, one would import statically import methods such as assertTrue(), assertEquals(), etc... However, those methods used to be provided by the TestCase class. In order to keep the code change to a minimum, we imitate this behavior by extending the Assert class instead.
The empty setUp() and tearDown() methods, as well as blank constructors have been removed.
Note that we only migrate to Junit4 instead of JUnit5, simply because Tycho is currently unable to execute those test suites. However, it should be much more straightforward to switch from 4 to 5 than from 3 to 4.
In short: