例如
public class math {
public void M(int a,int b) throws Exception{
try{
.....
}
catch(Exception e){
throwsException();
}
}
}
请问如何在Juint的testM()方法中测到这个exception的抛出.
...全文
42回复打赏收藏
junit问题,如果有exception抛出用什么样方法才能查测到????
例如 public class math { public void M(int a,int b) throws Exception{ try{ ..... } catch(Exception e){ throwsException(); } } } 请问如何在Juint的testM()方法中测到这个exception的抛出.