mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Exclude JUnit 4 from Whiteboard and update imports to JUnit 5 (#2534)
* Exclude JUnit 4 from Whiteboard and update imports to JUnit 5 Excludes the transitive JUnit 4 dependency from the Aries JAX-RS Whiteboard. The Whiteboard should not have a compile scope dependency on JUnit so I've created https://github.com/apache/aries-jax-rs-whiteboard/pull/135 to fix this. The wrong scope has resulted in some tests using JUnit 4 imports which is also fixed in this PR. Signed-off-by: Wouter Born <github@maindrain.net> * Add commonly used JUnit 4 classes to forbidden packages Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
9d9dc70d89
commit
569dddd046
@ -137,6 +137,10 @@
|
|||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
||||||
|
@ -66,6 +66,10 @@
|
|||||||
<artifactId>org.apache.aries.jax.rs.whiteboard</artifactId>
|
<artifactId>org.apache.aries.jax.rs.whiteboard</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.core.storage.json.internal;
|
package org.openhab.core.storage.json.internal;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.core.thing.binding;
|
package org.openhab.core.thing.binding;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.mockito.Mockito.*;
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.core.thing.binding;
|
package org.openhab.core.thing.binding;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.mockito.Mockito.*;
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,7 +17,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.openhab.core.events.Event;
|
import org.openhab.core.events.Event;
|
||||||
import org.openhab.core.thing.ChannelUID;
|
import org.openhab.core.thing.ChannelUID;
|
||||||
import org.openhab.core.thing.link.ItemChannelLink;
|
import org.openhab.core.thing.link.ItemChannelLink;
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.core.library.types;
|
package org.openhab.core.library.types;
|
||||||
|
|
||||||
import static org.junit.Assert.assertThrows;
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
|
@ -14,7 +14,6 @@ package org.openhab.core.library.types;
|
|||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.junit.Assert.assertThrows;
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.openhab.core.library.unit.MetricPrefix.CENTI;
|
import static org.openhab.core.library.unit.MetricPrefix.CENTI;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
checkstyle.beforeExecutionExclusionFileFilter.fileNamePattern=.+org.openhab.core.internal.i18n.I18nProviderImpl\.java$|.+org.openhab.core.i18n.TranslationProvider\.java$
|
checkstyle.beforeExecutionExclusionFileFilter.fileNamePattern=.+org.openhab.core.internal.i18n.I18nProviderImpl\.java$|.+org.openhab.core.i18n.TranslationProvider\.java$
|
||||||
checkstyle.forbiddenPackageUsageCheck.exceptions=
|
checkstyle.forbiddenPackageUsageCheck.exceptions=
|
||||||
checkstyle.forbiddenPackageUsageCheck.forbiddenPackages=com.google.common
|
checkstyle.forbiddenPackageUsageCheck.forbiddenPackages=com.google.common,org.junit.Assert,org.junit.Test
|
||||||
checkstyle.headerCheck.content=^/\\*\\*$\\n^ \\* Copyright \\(c\\) {0}-{1} Contributors to the openHAB project$\\n^ \\*$\\n^ \\* See the NOTICE file\\(s\\) distributed with this work for additional$\\n^ \\* information.$\\n^ \\*$\\n^ \\* This program and the accompanying materials are made available under the$\\n^ \\* terms of the Eclipse Public License 2\\.0 which is available at$\\n^ \\* http://www.eclipse.org/legal/epl\\-2\\.0$\\n^ \\*$\\n^ \\* SPDX-License-Identifier: EPL-2.0$
|
checkstyle.headerCheck.content=^/\\*\\*$\\n^ \\* Copyright \\(c\\) {0}-{1} Contributors to the openHAB project$\\n^ \\*$\\n^ \\* See the NOTICE file\\(s\\) distributed with this work for additional$\\n^ \\* information.$\\n^ \\*$\\n^ \\* This program and the accompanying materials are made available under the$\\n^ \\* terms of the Eclipse Public License 2\\.0 which is available at$\\n^ \\* http://www.eclipse.org/legal/epl\\-2\\.0$\\n^ \\*$\\n^ \\* SPDX-License-Identifier: EPL-2.0$
|
||||||
checkstyle.headerCheck.values=2010,2021
|
checkstyle.headerCheck.values=2010,2021
|
||||||
checkstyle.pomXmlCheck.currentVersionRegex=^3\.0\.0
|
checkstyle.pomXmlCheck.currentVersionRegex=^3\.0\.0
|
||||||
|
Loading…
Reference in New Issue
Block a user