我正在使用mockito,并试图模拟
scala对象.
object Sample { } //test class SomeTest extends Specification with ScalaTest with Mockito { "mocking should succeed" in { val mockedSample = mock[Sample] } }
这给我两个编译错误.
error: Not found type Sample error: Could not find implicit value for parameter m: scala.reflect.ClassManifest[<error>]
如果我将样本从对象更改为类,它可以工作.
可以用mockito模拟scala对象吗?如果是的话?