Java junit 5 expected exception example

htt‮sp‬://www.lautturi.com
Java junit 5 expected exception example
@Test
void testExpectedException() {
 
  Assertions.assertThrows(NumberFormatException.class, () -> {
    Integer.parseInt("One");
  });
 
}
Created Time:2017-09-05 13:59:48  Author:lautturi