BAEL-3504: Added blank lines before when and then in unit test
This commit is contained in:
parent
3771a056b3
commit
910ac808c8
|
@ -12,9 +12,12 @@ public class InvocationTargetUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenCallingMethodThrowsException_thenAssertCauseOfInvocationTargetException() throws Exception {
|
public void whenCallingMethodThrowsException_thenAssertCauseOfInvocationTargetException() throws Exception {
|
||||||
|
|
||||||
InvocationTargetExample targetExample = new InvocationTargetExample();
|
InvocationTargetExample targetExample = new InvocationTargetExample();
|
||||||
Method method = InvocationTargetExample.class.getMethod("divideByZeroExample");
|
Method method = InvocationTargetExample.class.getMethod("divideByZeroExample");
|
||||||
|
|
||||||
Exception exception = assertThrows(InvocationTargetException.class, () -> method.invoke(targetExample));
|
Exception exception = assertThrows(InvocationTargetException.class, () -> method.invoke(targetExample));
|
||||||
|
|
||||||
assertEquals(ArithmeticException.class, exception.getCause().getClass());
|
assertEquals(ArithmeticException.class, exception.getCause().getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue