This section contains the detail about how to configure Static imports with Eclipse
Static imports with Eclipse
-
JUnit uses a lot of static methods and Eclipse cannot automatically import static imports. You can make the JUnit test methods available via the content assists.
-
Open the Preferences via Window -> Preferences and select Java >Editor > Content Assist > Favorites. Add the methods you need via "New Member".For example this makes the assertTrue, assertFalse and assertEquals method available.
After adding these method to content assist, Eclipse can automatically import static imports(which are added).
[ 0 ] Comments