I have the following test class:
import org.scalatest.FunSuite
@RunWith(classOf[JUnitRunner])
class NodeScalaSuite extends FunSuite {
With this test method:
test("Now doesn't terminate future that's not done") {
val testFuture: Future[Int] = Future{
wait(1000)
10
}
assertThrows[NoSuchElementException]{
testFuture.now
}
}
I am getting this error:
not found: value assertThrows
I looked over the ScalaTest documentation from here http://doc.scalatest.org/3.0.0/#org.scalatest.FunSuite and the code that's similar to mine seems to work fine.
What's the issue?