我正在使用specs2编写单元测试用例,并且我的应用程序已针对每个测试实例启动和停止。 import org.specs2.mutable._
class HelloWorldSpec extends Specification {
"The 'Hello world' string" should {
"contain 11 characters" in new Wit
我试图按照最常用的方式来进行一些完全测试的DAO服务。 我有几类情况,如下列: case class Person (
id :Int,
firstName :String,
lastName :String
)
case class Car (
id :Int,
brand :String,
model :String
)
我想测试具有不同行为的函数的行为,具体取决于执行的行为,是否有方法来定义/模拟日期在specs2? 示例如何测试以下内容? def dateDependingFunction:Boolean = currentDate > aSetDate
我想能如果你使用乔达写类似 "My Date depending functions" should{
// here somehow set a da