我創建了一個SortedList類,它有一個構造函數,它將java.util.Comparator作爲參數。 在我的機器上運行單元測試(通過eclipse 3.3.0)後,一切正常。然而,哈德遜的投訴,因爲它說它不能實例化我的比較。 這裏的我的簡單測試(片段) public class SortedListTest {
class strcmp implements Comparato
在參數化類中運行的junit測試類中,我可以使用多個@Parameters方法嗎? @RunWith(value = Parameterized.class)
public class JunitTest6 {
private String str;
public JunitTest6(String region, String coverageKind,
String ma
我想爲使用Scala的JUnit 4測試設置期望的異常。我現在做類似下面的內容: @Test(expected=classOf[NullPointerException])
def someTest() = {
// Some test code
}
,但我得到以下編譯器錯誤:與屬性 error: wrong number of arguments for constructor