java - assertTrue statement requires static import in intelliJ IDEA? -


i shifted project form netbeans intellij idea, junit based test project. in netbeans using statments

asserttrue("message", conditioncustom()); 

and working without import. when using same above command in intellij have import file

import static org.junit.assert.asserttrue; 

is there way dont need write above line in code file? otherwise have edit files working asserttrue statement.

you either have add static import or make clear class static call associated with:

assert.asserttrue("message", conditioncustom()); 

i use latter because think it's clearer.

java won't compile unless can figure out class associate static method with.

i'd guess perhaps use inheritance associate static method test.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -