scala scala specs2.framework=org.scalatra.specs2.Specification scala import org.specs2.mutable.Specification class CalculatorSpec extends Specification { "Calculator" should { "correctly add two numbers" in { val calculator = new Calculator() val result = calculator.add(2, 3) result mustEqual 5 } "correctly subtract two numbers" in { val calculator = new Calculator() val result = calculator.subtract(5, 3) result mustEqual 2 } } } scala SBTProjectPlugin.projectSettings ++ Seq( jacoco.settings ) shell sbt jacoco


上一篇:
下一篇:
切换中文