Scala を使用して JUnit 4 テストに予期される例外を設定したいと考えています。私は現在、次のようなことをしています:
@Test(expected=classOf[NullPointerException])
def someTest() = {
// Some test code
}
しかし、次のコンパイラ エラーが発生します。
error: wrong number of arguments for constructor Test: ()org.junit.Test