4
是否有可能在測試Java代碼的ScalaTest中創建自定義的任意生成器(混合了Checkers for ScalaCheck屬性)?例如,以下是對每一個測試中FORALL上述創建自定義的任意生成器來測試ScalaTest的Java代碼ScalaCheck
val fund = new Fund()
val fundAccount = new Account(Account.RETIREMENT)
val consumer = new Consumer("John")
.createAccount(fundAccount)
fund.addConsumer(consumer)
fundAccount.deposit(amount)
是之前斷言結果等