Min*_*Ant 6 scala maven scalatest
我有一个scalatest文件
// MyDefaultTest.scala
import collection.mutable.Stack
import org.scalatest._
class StackSpec extends FlatSpec {
"A Stack" should "pop values in last-in-first-out order" in {
val stack = new Stack[Int]
stack.push(1)
stack.push(2)
assert(stack.pop() === 2)
assert(stack.pop() === 1)
}
it should "throw NoSuchElementException if an empty stack is popped" in {
val emptyStack = new Stack[String]
intercept[NoSuchElementException] {
emptyStack.pop()
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的项目使用Maven.我想,从命令行,只运行"一个堆栈应该以后进先出的顺序弹出值"
我怎样才能做到这一点?
到目前为止,我只想出了如何运行该文件:
mvn test -DwildcardSuites = com.package.whatever.MyStupidTest
归档时间: |
|
查看次数: |
1090 次 |
最近记录: |