diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 1be908ba85..159f8d581b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -50,6 +50,14 @@ jobs: # Run pmd:pmd and pmd:cpd first to generate reports for all modules, then run pmd:check and pmd:cpd-check # This ensures all violations are collected and reported before the build fails run: xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end + - name: Fail on missing surefire reports + # Tycho-Surefire writes no TEST-*.xml when discovery is empty — fail the job in that case. + if: always() + run: | + if ! find . -path '*/target/surefire-reports/TEST-*.xml' -print -quit | grep -q .; then + echo "::error::No surefire reports found. Test discovery is likely broken." + exit 1 + fi - name: Archive Tycho Surefire Plugin if: ${{ failure() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 diff --git a/com.avaloq.tools.ddk.check.core.test/.classpath b/com.avaloq.tools.ddk.check.core.test/.classpath index bad5dd7a27..ea3640ba13 100644 --- a/com.avaloq.tools.ddk.check.core.test/.classpath +++ b/com.avaloq.tools.ddk.check.core.test/.classpath @@ -3,7 +3,6 @@ - diff --git a/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF index 0bd941889e..d5412a8e0d 100644 --- a/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF @@ -29,7 +29,6 @@ Require-Bundle: com.avaloq.tools.ddk.check.core, org.eclipse.xtext.xbase.testing, junit-jupiter-api, junit-jupiter-engine, - junit-vintage-engine, junit-platform-suite-api Export-Package: com.avaloq.tools.ddk.check.core.test, com.avaloq.tools.ddk.check.core.test.util, diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath b/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath index a0c3adab0f..1b7ceb1beb 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath @@ -10,7 +10,6 @@ - diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF index 1154b3c5e0..1477542dc0 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF @@ -19,8 +19,7 @@ Require-Bundle: com.avaloq.tools.ddk.check.runtime.core, org.eclipse.xtext.xbase.lib, junit-jupiter-api, junit-jupiter-engine, - junit-platform-suite-api, - junit-vintage-engine + junit-platform-suite-api Import-Package: org.hamcrest.core Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check.test.runtime, diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF index c5372c62e6..dc244afce0 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF @@ -20,8 +20,7 @@ Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, org.eclipse.xtext.xbase.ui.testing, junit-jupiter-api, junit-jupiter-engine, - junit-platform-suite-api, - junit-vintage-engine + junit-platform-suite-api Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.sample.helloworld.test, com.avaloq.tools.ddk.sample.helloworld.ui;x-internal=true diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ExtensionRegistryMock.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ExtensionRegistryMock.java index d9b1b5bb1b..b6da91dc6c 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ExtensionRegistryMock.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ExtensionRegistryMock.java @@ -25,7 +25,7 @@ import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.RegistryFactory; import org.eclipse.emf.common.util.WrappedException; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import org.mockito.stubbing.Answer; import com.google.common.collect.LinkedHashMultimap; @@ -179,7 +179,7 @@ public static void assertUnMocked() { if (registrySpy != null) { try { String extensionPointId = configurationElements.keySet().iterator().next(); - Assert.fail("Extension point " + extensionPointId + " still has mocked configuration elements."); //$NON-NLS-1$ //$NON-NLS-2$ + Assertions.fail("Extension point " + extensionPointId + " still has mocked configuration elements."); //$NON-NLS-1$ //$NON-NLS-2$ } catch (NoSuchElementException e) { // shouldn't happen throw new IllegalStateException("The extension registry mock is in an unexpected state.", e); //$NON-NLS-1$ } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ServiceMock.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ServiceMock.java index 11ab1a0811..21f9ebdd44 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ServiceMock.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/mock/ServiceMock.java @@ -11,10 +11,9 @@ package com.avaloq.tools.ddk.test.core.mock; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; /** @@ -46,10 +45,8 @@ public static boolean isMocked(final Class classToCheck) { */ public static void assertAllMocksRemoved() { if (!originalServices.keySet().isEmpty()) { - Iterator> iterator = originalServices.keySet().iterator(); - while (iterator.hasNext()) { - Class clazz = iterator.next(); - Assert.fail("Service " + clazz.getName() + " is still mocked."); //$NON-NLS-1$//$NON-NLS-2$ + for (Class clazz : originalServices.keySet()) { + Assertions.fail("Service " + clazz.getName() + " is still mocked."); //$NON-NLS-1$//$NON-NLS-2$ } } } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobMatcher.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobMatcher.java index 6605221f6f..3c3a8d56e6 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobMatcher.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobMatcher.java @@ -19,7 +19,7 @@ import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableList; @@ -214,7 +214,7 @@ public final void deregister() { * the expected number of jobs */ public final void assertNumberOfNewJobs(final int expected) { - Assert.assertEquals("Wrong number of jobs were scheduled", expected, newJobs.size()); + Assertions.assertEquals(expected, newJobs.size(), "Wrong number of jobs were scheduled"); } /** @@ -227,13 +227,13 @@ public final void assertNumberOfNewJobs(final int expected) { public final void assertNewJobsFinished() { try { List expectedJobs = Lists.newArrayList(newJobs); - Assert.assertFalse("No matching new jobs were scheduled: " + finder, expectedJobs.isEmpty()); + Assertions.assertFalse(expectedJobs.isEmpty(), "No matching new jobs were scheduled: " + finder); expectedJobs.removeAll(finishedJobs); while (!expectedJobs.isEmpty()) { try { Job job = getNextJob(); if (job == null) { - Assert.fail("Expected new jobs did not finish after " + waitTimeout + " milliseconds: " + expectedJobs); + Assertions.fail("Expected new jobs did not finish after " + waitTimeout + " milliseconds: " + expectedJobs); } expectedJobs.remove(job); } catch (InterruptedException e) { @@ -261,7 +261,7 @@ public final void waitForExistingJobs() { try { Job job = getNextJob(); if (job == null) { - Assert.fail("Existing jobs did not finish after " + waitTimeout + " milliseconds: " + expectedJobs); + Assertions.fail("Existing jobs did not finish after " + waitTimeout + " milliseconds: " + expectedJobs); } expectedJobs.remove(job); } catch (InterruptedException e) { diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/SimpleProgressMonitor.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/SimpleProgressMonitor.java index 01cf8bedd8..754acb8607 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/SimpleProgressMonitor.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/SimpleProgressMonitor.java @@ -11,7 +11,7 @@ package com.avaloq.tools.ddk.test.core.util; import org.eclipse.core.runtime.IProgressMonitor; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; /** @@ -169,7 +169,7 @@ public void waitForTermination() { final long timeStarted = System.currentTimeMillis(); while (!isTerminated()) { long remainingWaitTime = TIMEOUT + timeStarted - System.currentTimeMillis(); - Assert.assertFalse("Progress monitor did not get done signal", remainingWaitTime <= 0); //$NON-NLS-1$ + Assertions.assertFalse(remainingWaitTime <= 0, "Progress monitor did not get done signal"); //$NON-NLS-1$ try { this.wait(remainingWaitTime); } catch (InterruptedException e) /* CHECKSTYLE:OFF */ { diff --git a/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF index 020b707efc..2f8751bc15 100644 --- a/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF @@ -28,6 +28,8 @@ Export-Package: com.avaloq.tools.ddk.test.ui, com.avaloq.tools.ddk.test.ui.swtbot, com.avaloq.tools.ddk.test.ui.swtbot.condition, com.avaloq.tools.ddk.test.ui.swtbot.util -Import-Package: org.slf4j, org.apache.logging.log4j +Import-Package: org.apache.logging.log4j, + org.junit.jupiter.api;version="[5.14.0,6.0.0)", + org.slf4j Eclipse-RegisterBuddy: org.eclipse.swtbot.swt.finder Automatic-Module-Name: com.avaloq.tools.ddk.test.ui diff --git a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/CoreSwtbotTools.java b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/CoreSwtbotTools.java index 0098da9e6b..ecf30f58c6 100644 --- a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/CoreSwtbotTools.java +++ b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/CoreSwtbotTools.java @@ -11,7 +11,7 @@ package com.avaloq.tools.ddk.test.ui.swtbot; import static org.eclipse.swtbot.swt.finder.waits.Conditions.widgetIsEnabled; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.awt.AWTException; import java.awt.Robot; @@ -455,7 +455,7 @@ public static void openView(final SWTWorkbenchBot bot, final String category, fi } } } - assertTrue("View or Category found", bot.button().isEnabled()); + assertTrue(bot.button().isEnabled(), "View or Category found"); bot.button("OK").click(); } @@ -498,7 +498,7 @@ public static SWTBotTreeItem findTreeItem(final SWTWorkbenchBot bot, final SWTBo } } while (itemCount > 0); - assertTrue("Searching TreeItem", itemFound); + assertTrue(itemFound, "Searching TreeItem"); return botTreeItem; diff --git a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/SwtWizardBot.java b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/SwtWizardBot.java index d22130a94d..9e390078c1 100644 --- a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/SwtWizardBot.java +++ b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/SwtWizardBot.java @@ -12,7 +12,7 @@ import static com.avaloq.tools.ddk.test.ui.swtbot.util.SwtBotWizardUtil.selectItem; import static org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.syncExec; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; @@ -49,7 +49,7 @@ public class SwtWizardBot extends SwtWorkbenchBot { public void closeWizard() { SWTBotShell activeShell = activeShell(); boolean wizardIsActive = isWizard(activeShell); - assertTrue("Wizard is active on close", wizardIsActive); + assertTrue(wizardIsActive, "Wizard is active on close"); activeShell.close(); } @@ -155,13 +155,13 @@ public void openExportWizard(final String wizardName) { * name of the wizard to be activated */ private void activateWizard(final String wizardName) { - assertTrue("A wizard dialog must be active", syncExec(() -> { + assertTrue(syncExec(() -> { SWTBotShell wizardShell = activeShell(); return wizardShell.widget.getData() instanceof WizardDialog; - })); - assertTrue("Wizard '" + wizardName + "' does not exist.", syncExec(() -> { + }), "A wizard dialog must be active"); + assertTrue(syncExec(() -> { return selectItem(tree(), wizardName); - })); + }), "Wizard '" + wizardName + "' does not exist."); clickButton(NEXT); } diff --git a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotWizardUtil.java b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotWizardUtil.java index fc73ed9588..582706d1d0 100644 --- a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotWizardUtil.java +++ b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotWizardUtil.java @@ -18,7 +18,7 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; import org.eclipse.ui.PlatformUI; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.test.ui.swtbot.SwtWorkbenchBot; @@ -48,7 +48,7 @@ public static void selectProjectFolder(final SwtWorkbenchBot bot, final String f final Tree tree = bot.widget(WidgetMatcherFactory.widgetOfType(Tree.class), comp); PlatformUI.getWorkbench().getDisplay().syncExec(() -> { SWTBotTree botTree = new SWTBotTree(tree); - Assert.assertTrue("folder was not found", selectItem(botTree, folderName)); + Assertions.assertTrue(selectItem(botTree, folderName), "folder was not found"); }); } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AcfContentAssistProcessorTestBuilder.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AcfContentAssistProcessorTestBuilder.java index 9193c91fc4..c3a5303078 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AcfContentAssistProcessorTestBuilder.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AcfContentAssistProcessorTestBuilder.java @@ -11,7 +11,7 @@ package com.avaloq.tools.ddk.xtext.test; // CHECKSTYLE:OFF -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; import java.text.MessageFormat; import java.util.concurrent.atomic.AtomicReference; @@ -35,7 +35,7 @@ import org.eclipse.xtext.util.Pair; import org.eclipse.xtext.util.StringInputStream; import org.eclipse.xtext.util.Tuples; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.google.inject.Injector; @@ -111,7 +111,7 @@ public AcfContentAssistProcessorTestBuilder applyText(final String expectedDispl break; } } - assertNotNull(MessageFormat.format("\"{0}\" not a valid completion proposal", expectedDisplayString), proposal); + assertNotNull(proposal, MessageFormat.format("\"{0}\" not a valid completion proposal", expectedDisplayString)); String text = ""; if (proposal instanceof ConfigurableCompletionProposal) { text = ((ConfigurableCompletionProposal) proposal).getReplacementString(); @@ -180,11 +180,11 @@ public ContentAssistProcessorTestBuilder assertMatchString(final String matchStr ContentAssistContext.Factory factory = get(ContentAssistContext.Factory.class); ContentAssistContext[] contexts = factory.create(sourceViewer, currentModelToParse.length(), xtextResource); for (ContentAssistContext context : contexts) { - Assert.assertTrue("matchString = '" + matchString + "', actual: '" + context.getPrefix() + "'", "".equals(context.getPrefix()) - || matchString.equals(context.getPrefix())); + Assertions.assertTrue("".equals(context.getPrefix()) || matchString.equals(context.getPrefix()), "matchString = '" + matchString + "', actual: '" + + context.getPrefix() + "'"); } } else { - Assert.fail("No content assistant for content type " + contentType); + Assertions.fail("No content assistant for content type " + contentType); } } catch (BadLocationException e) { exception.set(e); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/contentassist/AbstractAcfContentAssistTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/contentassist/AbstractAcfContentAssistTest.java index af4c279989..a6c6392b5e 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/contentassist/AbstractAcfContentAssistTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/contentassist/AbstractAcfContentAssistTest.java @@ -10,9 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.contentassist; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.fail; import java.text.MessageFormat; import java.util.Arrays; @@ -91,7 +91,7 @@ private String getCompletionProposalDisplayStrings(final ICompletionProposal... * the expected proposals as display strings */ private void assertCompletionProposal(final ICompletionProposal[] computedProposals, final boolean positiveTest, final String... proposals) { - assertNotEquals(AT_LEAST_ONE_PROPOSAL_WAS_PROVIDED, proposals.length, 0); + assertNotEquals(0, proposals.length, AT_LEAST_ONE_PROPOSAL_WAS_PROVIDED); for (final String s : proposals) { boolean foundProposal = false; for (ICompletionProposal p : computedProposals) { @@ -156,7 +156,7 @@ protected void assertNotCompletionProposal(final ICompletionProposal[] computedP * the expected proposals as display strings */ protected void assertExactlyCompletionProposal(final ICompletionProposal[] computedProposals, final String... expectedProposals) { - assertNotEquals(AT_LEAST_ONE_PROPOSAL_WAS_PROVIDED, expectedProposals.length, 0); + assertNotEquals(0, expectedProposals.length, AT_LEAST_ONE_PROPOSAL_WAS_PROVIDED); Set computedProposalsAsSet = new HashSet(); for (ICompletionProposal p : computedProposals) { @@ -191,8 +191,8 @@ protected void assertExactlyCompletionProposal(final ICompletionProposal[] compu private void assertSourceProposals(final String sourceFileName) { try { AcfContentAssistProcessorTestBuilder builder = newBuilder().append(getTestSource(sourceFileName).getContent()); - assertFalse(EXPECTED_PROPOSALS_NOT_SET, (acfContentAssistMarkerTagInfo.expectedProposalMap.isEmpty() - && acfContentAssistMarkerTagInfo.notExpectedProposalMap.isEmpty() && acfContentAssistMarkerTagInfo.expectedExactlyProposalMap.isEmpty())); + assertFalse((acfContentAssistMarkerTagInfo.expectedProposalMap.isEmpty() && acfContentAssistMarkerTagInfo.notExpectedProposalMap.isEmpty() + && acfContentAssistMarkerTagInfo.expectedExactlyProposalMap.isEmpty()), EXPECTED_PROPOSALS_NOT_SET); for (int markerId : getUsedTagsItems()) { final ICompletionProposal[] proposals = builder.computeCompletionProposals(getOffsetForTag(markerId)); if (acfContentAssistMarkerTagInfo.expectedProposalMap.containsKey(markerId)) { diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/model/ModelUtil.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/model/ModelUtil.java index 3141572b4f..60cbc6239c 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/model/ModelUtil.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/model/ModelUtil.java @@ -14,7 +14,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; @@ -84,7 +84,7 @@ public Iterable getAllInstancesOf(final EObject context, // CHECKSTYLE:ON return Iterables.filter(getAllInstancesOf(context, type), input -> { if (input.eClass().getEStructuralFeature(feature.getFeatureID()) != feature) { - Assert.fail("Feature " + feature + " is not a feature of " + input.eClass()); //$NON-NLS-1$ //$NON-NLS-2$ + Assertions.fail("Feature " + feature + " is not a feature of " + input.eClass()); //$NON-NLS-1$ //$NON-NLS-2$ } final Object valueOfFeature = input.eGet(feature); return valueOfFeature != null && valueOfFeature.equals(value); diff --git a/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF index 2c06458a3e..ef98b20242 100644 --- a/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF @@ -28,7 +28,6 @@ Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.emf.ecore, junit-jupiter-api, junit-jupiter-engine, - junit-vintage-engine, junit-platform-suite-api, org.eclipse.xtext.testing, org.opentest4j diff --git a/com.avaloq.tools.ddk.xtext.test/pom.xml b/com.avaloq.tools.ddk.xtext.test/pom.xml index b94f0de796..50f58bb3ea 100644 --- a/com.avaloq.tools.ddk.xtext.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.test/pom.xml @@ -17,6 +17,7 @@ tycho-surefire-plugin ${tycho.version} + junit5 false false ${test.testClass} @@ -49,8 +50,8 @@ 0.0.0 - eclipse-feature - org.eclipse.pde + eclipse-plugin + org.eclipse.pde.junit.runtime 0.0.0 diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/builder/XtextBuildTriggerTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/builder/XtextBuildTriggerTest.java index c5a430401b..96b4e5dd0e 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/builder/XtextBuildTriggerTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/builder/XtextBuildTriggerTest.java @@ -23,7 +23,6 @@ import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.xtext.builder.impl.BuildScheduler; -import org.eclipse.xtext.builder.impl.IBuildFlag; import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.extensions.InjectionExtension; import org.junit.jupiter.api.BeforeEach; @@ -60,7 +59,7 @@ public void testTriggerRespectsAutoBuilding() { // auto-build disabled when(workspace.isAutoBuilding()).thenReturn(false); buildTrigger.scheduleFullBuild(); - verify(scheduler, never()).scheduleBuildIfNecessary(ArgumentMatchers.> any(), ArgumentMatchers. any()); + verify(scheduler, never()).scheduleBuildIfNecessary(ArgumentMatchers.> any()); reset(workspace); reset(scheduler); @@ -72,6 +71,6 @@ public void testTriggerRespectsAutoBuilding() { when(workspace.getRoot()).thenReturn(root); when(root.getProjects()).thenReturn(projects); buildTrigger.scheduleFullBuild(); - verify(scheduler).scheduleBuildIfNecessary(eq(Arrays.asList(projects)), ArgumentMatchers. any()); + verify(scheduler).scheduleBuildIfNecessary(eq(Arrays.asList(projects))); } } diff --git a/ddk-configuration/launches/devkit-run.launch b/ddk-configuration/launches/devkit-run.launch index 0229f0ddcc..da20fcf741 100644 --- a/ddk-configuration/launches/devkit-run.launch +++ b/ddk-configuration/launches/devkit-run.launch @@ -269,7 +269,6 @@ - @@ -293,7 +292,6 @@ - diff --git a/ddk-target/ddk.target b/ddk-target/ddk.target index aff6ba174c..cb1c3b8372 100644 --- a/ddk-target/ddk.target +++ b/ddk-target/ddk.target @@ -1,29 +1,27 @@ - + - - - - - + + + + + + + - - - - @@ -53,7 +51,6 @@ - @@ -62,7 +59,909 @@ - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file