java - using mockito with IntelliJ -
i new java, , background in .net. trying use mockito in java project in intellij. trying follow simple example:
http://code.google.com/p/mockito/
so, added library mockito-all-1.9.5.jar folder c:\{my app path}\web\app\web-inf\lib
and added in intellij using project structure , libraries.
and created test class , add following
import static org.mockito.mockito.*; , getting error:
"static imports not supported @ language level"
under file - project structure - project, make sure have project language level set @ least 5.0. (i expect 6.0 or 7.0 now). static imports indeed supported since java 5.
also, mockito used in tests, , has no reason part of deployed libraries of webapp. should not under web-inf/lib.
Comments
Post a Comment