1
我試圖使用specs2 DataTable填充容器,然後檢查它的一些條件。問題是DataTable之後的匹配器被忽略。考慮下面如何將DataTables與其他匹配器結合使用?
class MySpec extends Specification with DataTables {
"A Container" should {
"after data is added container should have the following data" in new TestContainer {
"a" | "flag" | "d" |
100 ! 1 ! "abc" |
300 ! 1 ! "abc" |
200 ! 0 ! "xyz" |>
{ (a, flag, d) =>
container.add(Data(a, flag, d)) must not(throwA[Exception])
}
container.size must_== 3 // Ignored
1 must_== 2 // Ignored
}
}
}
請讓我知道我缺少什麼,以及如何使線標記爲// Ignored
要驗證的代碼。
謝謝!它與2.4-SNAPSHOT預期的一樣 – andruha