In JUnit 5, we can use assertThrows to assert an exception is thrown. P.S Tested with JUnit 5.5.2. 1. Unchecked Exception. 1.1 JUnit example of ...
確定! 回上一頁