I am using ScalaMock3 and I am trying to create a mock of a javax.jms.TextMessage
within my ScalaTest spec.
import javax.jms.TextMessage
import org.scalamock.scalatest.MockFactory
import org.scalatest.{Matchers, WordSpecLike}
class MySpec extends WordSpecLike
with Matchers
with MockFactory {
"MySpec" should {
"create the mock I want!" in {
val msg = mock[TextMessage]
msg.getText _ expects() returning "my_text"
msg.getText shouldBe "my_text"
}
}
}
However, when I try to compile, I get the following:
[error] /my/path/MySpec.scala:14: could not find implicit value for evidence parameter of type org.scalamock.util.Defaultable[java.util.Enumeration]
[error] val msg = mock[TextMessage]
^
Looking online, I found this (unresolved) issue, but I was hoping someone could suggest a work-around at least...
Thanks