BAEL-926 Upgrade Junit 5 dependencies to use M4 (#1802)
* BAEL-88 Testing in Spring Boot * BAEL-88 Integration tests fixed. * BAEL-905 Improvement task for spring boot testing * BAEL-905 Improvement task for spring boot testing * BAEL-926 Upgrade Junit 5 dependencies to use M4
This commit is contained in:
@@ -2,7 +2,6 @@ package com.baeldung;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.expectThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -10,7 +9,7 @@ public class ExceptionTest {
|
||||
|
||||
@Test
|
||||
void shouldThrowException() {
|
||||
Throwable exception = expectThrows(UnsupportedOperationException.class, () -> {
|
||||
Throwable exception = assertThrows(UnsupportedOperationException.class, () -> {
|
||||
throw new UnsupportedOperationException("Not supported");
|
||||
});
|
||||
assertEquals(exception.getMessage(), "Not supported");
|
||||
|
||||
Reference in New Issue
Block a user