在@Test後面加上excepted參數,可以測試程式是否會如拋出我們預期的Exception。 ... throw new RuntimeException(); } // 沒拋出任何Exception @Test(expected ...
確定! 回上一頁