Skip to content

Commit 21a6137

Browse files
Upgrade Mockito to 5.19, junit-jupiter to 5.13.4
* Upgrade Mockito from 4.11 to 5.19. Changelog: https://github.com/mockito/mockito/releases * Upgrade junit-jupiter from 5.11.4 to 5.13.4 Changelog: https://docs.junit.org/5.13.4/release-notes * Add workaround to allow junit-jupiter>=5.12 with OSGI Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
1 parent 7d8aca4 commit 21a6137

106 files changed

Lines changed: 268 additions & 265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bom/test-index/pom.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@
1919
<dependency>
2020
<groupId>org.junit.jupiter</groupId>
2121
<artifactId>junit-jupiter-engine</artifactId>
22-
<!-- junit 5.12.0 to 5.13.0-M3 fails silently with bnd 7.1.0, not executing unit tests;
23-
not sure if this is a bnd/junit issue or due to wrong configuration -->
24-
<version>5.11.4</version>
22+
<version>5.13.4</version>
2523
</dependency>
2624
<dependency>
2725
<groupId>org.junit.platform</groupId>
2826
<artifactId>junit-platform-launcher</artifactId>
29-
<version>1.11.4</version>
27+
<version>1.13.4</version>
3028
</dependency>
3129
<dependency>
3230
<groupId>org.junit.platform</groupId>
3331
<artifactId>junit-platform-engine</artifactId>
34-
<version>1.11.4</version>
32+
<version>1.13.4</version>
3533
</dependency>
3634
<dependency>
3735
<groupId>biz.aQute.bnd</groupId>

bundles/org.openhab.core.addon/src/test/java/org/openhab/core/addon/AddonInfoRegistryMergeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package org.openhab.core.addon;
1414

1515
import static org.junit.jupiter.api.Assertions.*;
16-
import static org.mockito.ArgumentMatchers.*;
1716
import static org.mockito.Mockito.*;
1817

1918
import java.util.List;

bundles/org.openhab.core.audio/src/test/java/org/openhab/core/audio/internal/AudioConsoleTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
import static org.hamcrest.CoreMatchers.*;
1616
import static org.hamcrest.MatcherAssert.assertThat;
17-
import static org.mockito.Mockito.*;
17+
import static org.mockito.Mockito.mock;
18+
import static org.mockito.Mockito.when;
1819

1920
import java.io.File;
2021
import java.io.IOException;

bundles/org.openhab.core.audio/src/test/java/org/openhab/core/audio/internal/AudioManagerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
import static org.hamcrest.MatcherAssert.assertThat;
1717
import static org.junit.jupiter.api.Assertions.fail;
1818
import static org.mockito.ArgumentMatchers.any;
19-
import static org.mockito.Mockito.*;
19+
import static org.mockito.Mockito.mock;
20+
import static org.mockito.Mockito.when;
2021

2122
import java.io.File;
2223
import java.io.IOException;

bundles/org.openhab.core.auth.oauth2client/src/test/java/org/openhab/core/auth/oauth2client/internal/OAuthRFC8628ClientTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package org.openhab.core.auth.oauth2client.internal;
1414

1515
import static org.junit.jupiter.api.Assertions.*;
16-
import static org.mockito.ArgumentMatchers.*;
1716
import static org.mockito.Mockito.*;
1817

1918
import java.io.IOException;

bundles/org.openhab.core.automation.module.script.rulesupport/src/test/java/org/openhab/core/automation/module/script/rulesupport/loader/AbstractScriptFileWatcherTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import static org.hamcrest.MatcherAssert.assertThat;
1616
import static org.hamcrest.Matchers.is;
1717
import static org.junit.jupiter.api.Assertions.fail;
18-
import static org.mockito.ArgumentMatchers.*;
1918
import static org.mockito.Mockito.*;
2019
import static org.openhab.core.OpenHAB.CONFIG_DIR_PROG_ARGUMENT;
2120
import static org.openhab.core.service.WatchService.Kind.*;

bundles/org.openhab.core.automation.module.script/src/test/java/org/openhab/core/automation/module/script/ScriptTransformationServiceTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import static org.hamcrest.MatcherAssert.assertThat;
1616
import static org.hamcrest.Matchers.*;
1717
import static org.junit.jupiter.api.Assertions.assertThrows;
18-
import static org.mockito.ArgumentMatchers.*;
1918
import static org.mockito.ArgumentMatchers.any;
2019
import static org.mockito.Mockito.*;
2120

bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/factory/EphemerisModuleHandlerFactoryTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import static org.hamcrest.CoreMatchers.*;
1616
import static org.hamcrest.MatcherAssert.assertThat;
1717
import static org.junit.jupiter.api.Assertions.assertThrows;
18-
import static org.mockito.Mockito.*;
18+
import static org.mockito.Mockito.mock;
19+
import static org.mockito.Mockito.when;
1920

2021
import java.util.Map;
2122

bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/handler/DateTimeTriggerHandlerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
import static java.util.Map.entry;
1616
import static org.mockito.ArgumentMatchers.eq;
17-
import static org.mockito.Mockito.*;
17+
import static org.mockito.Mockito.verify;
18+
import static org.mockito.Mockito.when;
1819

1920
import java.time.ZoneId;
2021
import java.time.ZoneOffset;

bundles/org.openhab.core.config.core/src/test/java/org/openhab/core/config/core/internal/metadata/MetadataConfigDescriptionProviderImplTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
package org.openhab.core.config.core.internal.metadata;
1414

1515
import static org.junit.jupiter.api.Assertions.*;
16-
import static org.mockito.ArgumentMatchers.*;
16+
import static org.mockito.ArgumentMatchers.any;
17+
import static org.mockito.ArgumentMatchers.eq;
1718
import static org.mockito.Mockito.when;
1819
import static org.openhab.core.config.core.internal.metadata.MetadataConfigDescriptionProviderImpl.*;
1920

0 commit comments

Comments
 (0)