1
我想驗證序列調用的順序,但沒有按預期工作。使用Mockito驗證序列調用的順序
import akka.actor.ActorSystem
import akka.testkit.TestKit
import org.scalatest._
import org.specs2.mock.Mockito
class Test extends TestKit(ActorSystem("testSystem"))
with WordSpecLike
with BeforeAndAfterAll
with PrivateMethodTester
with `enter code here`Mockito
{
val m = mock[java.util.List[String]]
m.get(0) returns "one"
there was two(m).get(2) //do not throw any error, why???
}
我使用
階2.11.7,
specs2核心3.6.6,
specs2-模擬3.6.6,
scalatest 2.2.4
THX
這是工作,謝謝 – myregister0618