私はScalaMock3を使用していますが、ScalaTest仕様内にjavax.jms.TextMessage
のモックを作成しようとしています。私がコンパイルしようとするとScalaMockはTextMessageをモックしません
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"
}
}
}
しかし、私は次の取得:オンライン探し
[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]
^
が、私はこの(未解決)issueを見つけましたが、私は、周りの仕事で誰かが提案する可能性が期待していました少なくとも...
おかげで