如何在scala测试中复制模拟对象?

时间:2016-06-30 11:35:47

标签: scala scalatest

我有下面的情绪。这有用吗?

case class Person(name: String)
val person = mock[Person]
val anotherPerson = person.copy(name = Some("name"))
anotherPerson shold not be null

0 个答案:

没有答案