Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 7a953ce

Browse files
committed
compatibility with JUnit 5 M4
1 parent b27b2df commit 7a953ce

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363

6464
<version.testutils>0.2</version.testutils>
6565
<version.junit4>4.12</version.junit4>
66-
<version.junit5.jupiter>5.0.0-M3</version.junit5.jupiter>
67-
<version.junit5.vintage>4.12.0-M3</version.junit5.vintage>
68-
<version.junit5.platform>1.0.0-M3</version.junit5.platform>
66+
<version.junit5.jupiter>5.0.0-M4</version.junit5.jupiter>
67+
<version.junit5.vintage>4.12.0-M4</version.junit5.vintage>
68+
<version.junit5.platform>1.0.0-M4</version.junit5.platform>
6969
<version.hamcrest>1.3</version.hamcrest>
7070
<version.assertj>3.6.1</version.assertj>
7171
<version.mockito>2.4.0</version.mockito>

webtester-support-junit5/src/test/java/info/novatec/testit/webtester/junit5/extensions/eventlistener/RegisteredEventListenerExtensionIntTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package info.novatec.testit.webtester.junit5.extensions.eventlistener;
22

33
import static org.assertj.core.api.Assertions.assertThat;
4-
import static org.junit.jupiter.api.Assertions.expectThrows;
4+
import static org.junit.jupiter.api.Assertions.assertThrows;
55
import static org.mockito.Mockito.verify;
66

77
import java.util.HashMap;
@@ -62,7 +62,7 @@ void test() {
6262
@Test
6363
@DisplayName("@Registered with static field will throw exception")
6464
void registerStaticEventListenerField() throws Exception {
65-
expectThrows(StaticEventListenerFieldsNotSupportedException.class, () -> {
65+
assertThrows(StaticEventListenerFieldsNotSupportedException.class, () -> {
6666
TestClassExecutor.execute(RegisteredStaticField.class);
6767
});
6868
}
@@ -257,7 +257,7 @@ void clear() {
257257
@Test
258258
@DisplayName("@Registered has no clear assignment to multi browser fields")
259259
void noClearBrowserAssignment() throws Exception {
260-
expectThrows(NoManagedBrowserForNameException.class, () -> {
260+
assertThrows(NoManagedBrowserForNameException.class, () -> {
261261
TestClassExecutor.execute(NoClearBrowserAssignment.class);
262262
});
263263
}

webtester-support-junit5/src/test/java/utils/TestClassExecutor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public Optional<String> get(String key) {
6464
return Optional.empty();
6565
}
6666

67+
@Override
68+
public Optional<Boolean> getBoolean(String key) {
69+
return Optional.empty();
70+
}
71+
6772
@Override
6873
public int size() {
6974
return 0;

0 commit comments

Comments
 (0)