how to test ArrayIndexOutOfBoundsException ? I have never tested with Junit, not sure what I have to do in this case

前端 未结 0 1649
后悔当初
后悔当初 2021-01-20 10:36
@Test(expected = ArrayIndexOutOfBoundsException.class) public void throwsArrayIndexException() {
    ...
}

I just have to test that if args[0]==0 in

相关标签:
回答
  • 消灭零回复
提交回复
热议问题