Last Updated: February 25, 2016
·
552
· hsdmiranda

Eclipse - adding static imports for tests

When you are writing your unit tests with eclipse you want to just right the assertions and get the auto complete, however it just show to you if you import manually the Asserts.

In order to let eclipse help, you have to add the list of static imports that you want.

Go to Window > Preferences > Java > Editor > Content Assist > Favorites

And the Junit Assert, for example:

org.junit.Assert.*