From 35d3b373473c7cd59ba0a6d07097306a16360874 Mon Sep 17 00:00:00 2001 From: Phillipus Date: Sun, 17 Nov 2024 14:50:56 +0000 Subject: [PATCH] [Unit Tests] Add JUnit and Mockito dependencies to testsupport plug-in - The testsupport plug-in re-exports JUnit and Mockito dependencies so there's no need to add them in each test plug-in - All test plug-ins will need to have a dependency on the testsupport plug-in - This will help when we move to Java 21 and have to support javaagent for Mockito in Maven. We need all test plug-ins to have a dependency on Mockito. --- tests/com.archimatetool.canvas.tests/META-INF/MANIFEST.MF | 7 ++----- .../META-INF/MANIFEST.MF | 2 -- tests/com.archimatetool.csv.tests/META-INF/MANIFEST.MF | 3 --- tests/com.archimatetool.editor.tests/META-INF/MANIFEST.MF | 7 ------- .../META-INF/MANIFEST.MF | 2 -- tests/com.archimatetool.hammer.tests/META-INF/MANIFEST.MF | 4 +--- tests/com.archimatetool.help.tests/META-INF/MANIFEST.MF | 4 +--- .../META-INF/MANIFEST.MF | 6 +----- tests/com.archimatetool.jdom.tests/META-INF/MANIFEST.MF | 2 -- tests/com.archimatetool.model.tests/META-INF/MANIFEST.MF | 5 ----- .../META-INF/MANIFEST.MF | 4 +--- tests/com.archimatetool.reports.tests/META-INF/MANIFEST.MF | 4 +--- tests/com.archimatetool.testsupport/META-INF/MANIFEST.MF | 6 +++++- tests/com.archimatetool.zest.tests/META-INF/MANIFEST.MF | 4 +--- .../META-INF/MANIFEST.MF | 2 -- 15 files changed, 13 insertions(+), 49 deletions(-) diff --git a/tests/com.archimatetool.canvas.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.canvas.tests/META-INF/MANIFEST.MF index fa1d0143f..c498dbda7 100644 --- a/tests/com.archimatetool.canvas.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.canvas.tests/META-INF/MANIFEST.MF @@ -4,11 +4,8 @@ Bundle-Name: JUnit Tests for Archi Canvas Editor Bundle-SymbolicName: com.archimatetool.canvas.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.canvas -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.jupiter.params, - org.junit.jupiter.params.provider, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools +Require-Bundle: com.archimatetool.testsupport Bundle-Vendor: Archi Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.archimatetool.canvas.tests diff --git a/tests/com.archimatetool.commandline.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.commandline.tests/META-INF/MANIFEST.MF index 368647cf6..193787880 100644 --- a/tests/com.archimatetool.commandline.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.commandline.tests/META-INF/MANIFEST.MF @@ -4,8 +4,6 @@ Bundle-Name: JUnit Tests for Command Line Bundle-SymbolicName: com.archimatetool.commandline.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.commandline -Import-Package: org.junit.jupiter.api, - org.junit.platform.suite.api Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.csv.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.csv.tests/META-INF/MANIFEST.MF index d6fbe67b9..187f8bfd2 100644 --- a/tests/com.archimatetool.csv.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.csv.tests/META-INF/MANIFEST.MF @@ -4,9 +4,6 @@ Bundle-Name: JUnit Tests for CSV Import/Export Bundle-SymbolicName: com.archimatetool.csv.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.csv -Import-Package: org.junit.jupiter.api, - org.junit.jupiter.api.function, - org.junit.platform.suite.api Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.editor.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.editor.tests/META-INF/MANIFEST.MF index c34715414..1acfef049 100644 --- a/tests/com.archimatetool.editor.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.editor.tests/META-INF/MANIFEST.MF @@ -4,13 +4,6 @@ Bundle-Name: JUnit Tests for Archi Editor Bundle-SymbolicName: com.archimatetool.editor.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.editor -Import-Package: org.junit.jupiter.api, - org.junit.jupiter.api.function, - org.junit.jupiter.params, - org.junit.jupiter.params.provider, - org.junit.platform.suite.api, - org.mockito, - org.mockito.stubbing Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.export.svg.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.export.svg.tests/META-INF/MANIFEST.MF index 606c952d6..0e943bb45 100644 --- a/tests/com.archimatetool.export.svg.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.export.svg.tests/META-INF/MANIFEST.MF @@ -4,8 +4,6 @@ Bundle-Name: JUnit Tests for SVG Export Bundle-SymbolicName: com.archimatetool.export.svg.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.export.svg -Import-Package: org.junit.jupiter.api, - org.junit.platform.suite.api Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.hammer.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.hammer.tests/META-INF/MANIFEST.MF index bed164559..adf20335b 100644 --- a/tests/com.archimatetool.hammer.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.hammer.tests/META-INF/MANIFEST.MF @@ -7,7 +7,5 @@ Fragment-Host: com.archimatetool.hammer Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools Automatic-Module-Name: com.archimatetool.hammer.tests diff --git a/tests/com.archimatetool.help.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.help.tests/META-INF/MANIFEST.MF index 9dc20a1c6..c4351ed4d 100644 --- a/tests/com.archimatetool.help.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.help.tests/META-INF/MANIFEST.MF @@ -7,7 +7,5 @@ Fragment-Host: com.archimatetool.help Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools Automatic-Module-Name: com.archimatetool.help.tests diff --git a/tests/com.archimatetool.jasperreports.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.jasperreports.tests/META-INF/MANIFEST.MF index ac26636f5..6fe1165c0 100644 --- a/tests/com.archimatetool.jasperreports.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.jasperreports.tests/META-INF/MANIFEST.MF @@ -7,9 +7,5 @@ Fragment-Host: com.archimatetool.jasperreports Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api, - org.mockito, - org.mockito.stubbing +Import-Package: com.archimatetool.testingtools Automatic-Module-Name: com.archimatetool.jasperreports.tests diff --git a/tests/com.archimatetool.jdom.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.jdom.tests/META-INF/MANIFEST.MF index ff554ceda..687cd8462 100644 --- a/tests/com.archimatetool.jdom.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.jdom.tests/META-INF/MANIFEST.MF @@ -4,8 +4,6 @@ Bundle-Name: JUnit Tests for Archi JDOM Bundle-SymbolicName: com.archimatetool.jdom.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.jdom -Import-Package: org.junit.jupiter.api, - org.junit.platform.suite.api Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.model.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.model.tests/META-INF/MANIFEST.MF index 14cddab33..541c8fe21 100644 --- a/tests/com.archimatetool.model.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.model.tests/META-INF/MANIFEST.MF @@ -4,11 +4,6 @@ Bundle-Name: JUnit Tests for Archi Model Bundle-SymbolicName: com.archimatetool.model.tests Bundle-Version: 4.0.0 Fragment-Host: com.archimatetool.model -Import-Package: org.junit.jupiter.api, - org.junit.jupiter.api.function, - org.junit.jupiter.params, - org.junit.jupiter.params.provider, - org.junit.platform.suite.api Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tests/com.archimatetool.modelimporter.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.modelimporter.tests/META-INF/MANIFEST.MF index adba42c4b..abbbb4e0f 100644 --- a/tests/com.archimatetool.modelimporter.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.modelimporter.tests/META-INF/MANIFEST.MF @@ -9,6 +9,4 @@ Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 Eclipse-BundleShape: dir Automatic-Module-Name: com.archimatetool.modelimporter.tests -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools diff --git a/tests/com.archimatetool.reports.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.reports.tests/META-INF/MANIFEST.MF index 2646a131d..2266522fb 100644 --- a/tests/com.archimatetool.reports.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.reports.tests/META-INF/MANIFEST.MF @@ -7,7 +7,5 @@ Fragment-Host: com.archimatetool.reports Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools Automatic-Module-Name: com.archimatetool.reports.tests diff --git a/tests/com.archimatetool.testsupport/META-INF/MANIFEST.MF b/tests/com.archimatetool.testsupport/META-INF/MANIFEST.MF index 1b7782e4c..5cd921278 100644 --- a/tests/com.archimatetool.testsupport/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.testsupport/META-INF/MANIFEST.MF @@ -8,6 +8,10 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Eclipse-BundleShape: dir Export-Package: com.archimatetool.tests Require-Bundle: org.eclipse.core.runtime, - org.eclipse.ui + org.eclipse.ui, + org.mockito.mockito-core;visibility:=reexport, + junit-jupiter-api;visibility:=reexport, + junit-jupiter-params;visibility:=reexport, + junit-platform-suite-api;visibility:=reexport Bundle-ClassPath: . Automatic-Module-Name: com.archimatetool.testsupport diff --git a/tests/com.archimatetool.zest.tests/META-INF/MANIFEST.MF b/tests/com.archimatetool.zest.tests/META-INF/MANIFEST.MF index b41eeba16..76b7cb16b 100644 --- a/tests/com.archimatetool.zest.tests/META-INF/MANIFEST.MF +++ b/tests/com.archimatetool.zest.tests/META-INF/MANIFEST.MF @@ -7,7 +7,5 @@ Fragment-Host: com.archimatetool.zest Bundle-Vendor: Archi Require-Bundle: com.archimatetool.testsupport Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.archimatetool.testingtools, - org.junit.jupiter.api, - org.junit.platform.suite.api +Import-Package: com.archimatetool.testingtools Automatic-Module-Name: com.archimatetool.zest.tests diff --git a/tests/org.opengroup.archimate.xmlexchange.tests/META-INF/MANIFEST.MF b/tests/org.opengroup.archimate.xmlexchange.tests/META-INF/MANIFEST.MF index 53963782e..d1e9007cd 100644 --- a/tests/org.opengroup.archimate.xmlexchange.tests/META-INF/MANIFEST.MF +++ b/tests/org.opengroup.archimate.xmlexchange.tests/META-INF/MANIFEST.MF @@ -4,8 +4,6 @@ Bundle-Name: JUnit Tests for ArchiMate Open Exchange Plugin Bundle-SymbolicName: org.opengroup.archimate.xmlexchange.tests Bundle-Version: 4.0.0 Fragment-Host: org.opengroup.archimate.xmlexchange -Import-Package: org.junit.jupiter.api, - org.junit.platform.suite.api Bundle-Vendor: Archi, The Open Group Require-Bundle: com.archimatetool.testsupport, com.archimatetool.canvas