@Test(expected = ArrayIndexOutOfBoundsException.class) public void throwsArrayIndexException() {
...
}
I just have to test that if args[0]==0 in main method, ArrayIndexOutOfBoundsException is expected, I tried with if(args[0]==0){throw new ArrayIndexOutOfBoundException} but didn't work.. I appreciate your help! Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire