I wrote a small part of the test code and compile it using IntelliJ IDEA 12 CE
import com.twitter.common.zookeeper.ZooKeeperClient import org.mockito.Mockito class MyResourceSpec { val zkClient = mock(classOf[ZooKeeperClient]) ... }
I get the following error:
not found: value classOf val zkClient = mock(classOf[ZooKeeperClient]) ^
However, I can successfully compile the project using mvn compilation. In addition, I have another test file in the same directory, "MyOtherResourceSpec.scala", which contains the exact lines of code.
Any thoughts on why this is not built correctly in IDEA?
Things I tried:
An employee suggested that IDEA might not recognize it as a scala file, and I tried clicking on a top-level project, and then clicking Maven> reimport.
Restarting IntelliJ
Copying all imports from "MyOtherResourceSpec.scala" in case something is missing
using Mockito.mock (classOf [ZooKeeperClient])
source share