diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..0c441a28a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +text eol=crlf \ No newline at end of file diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 6a90a1a8b..a7e85e946 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -4,8 +4,8 @@ jobs: pmd: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -26,9 +26,9 @@ jobs: uses: stCarolas/setup-maven@v5 with: maven-version: 3.9.9 - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up JDK 21 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/com.avaloq.tools.ddk.check.core.test/.classpath b/com.avaloq.tools.ddk.check.core.test/.classpath index 999bc6996..3450ddaac 100644 --- a/com.avaloq.tools.ddk.check.core.test/.classpath +++ b/com.avaloq.tools.ddk.check.core.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.check.core.test/CheckCoreTestSuite.launch b/com.avaloq.tools.ddk.check.core.test/CheckCoreTestSuite.launch index af5e37f28..2328824ee 100644 --- a/com.avaloq.tools.ddk.check.core.test/CheckCoreTestSuite.launch +++ b/com.avaloq.tools.ddk.check.core.test/CheckCoreTestSuite.launch @@ -23,7 +23,7 @@ - + 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 f3a46ce8a..76c1daa73 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 @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.core.test Bundle-SymbolicName: com.avaloq.tools.ddk.check.core.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.check.core, com.avaloq.tools.ddk.xtext.test.core, @@ -20,7 +20,7 @@ Require-Bundle: com.avaloq.tools.ddk.check.core, org.eclipse.xtend.lib, org.eclipse.xtext.ui.testing, org.eclipse.xtext.testing, - org.junit, + org.junit.jupiter.api, org.mockito, com.avaloq.tools.ddk.check.runtime.core, org.eclipse.ui.workbench;resolution:=optional, @@ -28,7 +28,9 @@ Require-Bundle: com.avaloq.tools.ddk.check.core, org.eclipse.xtext.xbase.lib, org.apache.logging.log4j, org.apache.commons.lang, - org.eclipse.xtext.xbase.testing + org.eclipse.xtext.xbase.testing, + org.junit, + junit-jupiter-api Export-Package: com.avaloq.tools.ddk.check.core.test, com.avaloq.tools.ddk.check.core.test.util, com.avaloq.tools.ddk.check.test.core, diff --git a/com.avaloq.tools.ddk.check.core.test/pom.xml b/com.avaloq.tools.ddk.check.core.test/pom.xml index 14747acad..11300b5be 100644 --- a/com.avaloq.tools.ddk.check.core.test/pom.xml +++ b/com.avaloq.tools.ddk.check.core.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/generator/IssueCodeValueTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/generator/IssueCodeValueTest.xtend index 26ad42659..55b67b4f4 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/generator/IssueCodeValueTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/generator/IssueCodeValueTest.xtend @@ -16,7 +16,7 @@ import org.junit.runner.RunWith import com.avaloq.tools.ddk.check.CheckInjectorProvider import org.eclipse.xtext.testing.XtextRunner import com.avaloq.tools.ddk.check.core.test.AbstractCheckGenerationTestCase -import org.junit.Test +import org.junit.jupiter.api.Test import java.util.List import org.eclipse.xtext.xbase.testing.JavaSource import java.io.ByteArrayInputStream diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/AbstractCheckTestCase.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/AbstractCheckTestCase.java index 506b69337..2cfe1ac08 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/AbstractCheckTestCase.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/AbstractCheckTestCase.java @@ -11,6 +11,9 @@ package com.avaloq.tools.ddk.check.core.test; import static com.google.common.collect.Sets.newHashSet; +import org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Assertions.assertNotNull; +import org.junit.jupiter.api.Assertions.fail; import java.io.IOException; import java.io.InputStream; @@ -19,8 +22,8 @@ import java.util.List; import java.util.Set; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; @@ -37,9 +40,9 @@ import org.eclipse.xtext.resource.XtextResourceSet; import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil; import org.eclipse.xtext.util.StringInputStream; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import com.avaloq.tools.ddk.check.CheckConstants; import com.avaloq.tools.ddk.check.ui.internal.CheckActivator; @@ -54,14 +57,12 @@ import com.google.inject.Injector; import com.google.inject.Provider; -import junit.framework.TestCase; - /** * An abstract test class for tests on Check models. Allows creating a project and adding files. */ @SuppressWarnings({"PMD.SignatureDeclareThrowsException", "restriction"}) -public abstract class AbstractCheckTestCase extends TestCase { +public abstract class AbstractCheckTestCase { private static final int TWO_KILO_BYTES = 2048; protected static final Logger LOGGER = LogManager.getLogger(AbstractCheckTestCase.class); private static final PluginTestProjectManager PROJECT_MANAGER = new PluginTestProjectManager(CheckActivator.getInstance().getInjector(CheckConstants.GRAMMAR)); @@ -72,7 +73,7 @@ public abstract class AbstractCheckTestCase extends TestCase { private Provider resourceSetProvider; @Override - @Before + @BeforeEach public void setUp() throws Exception { getInjector().injectMembers(this); } @@ -83,7 +84,7 @@ public void setUp() throws Exception { * @throws Exception * the exception */ - @BeforeClass + @BeforeAll public static void prepareWorkspace() throws Exception { PROJECT_MANAGER.setup(ImmutableList. of()); } @@ -117,7 +118,7 @@ public T get(final Class clazz) { /** * Clean up after all tests have terminated. */ - @AfterClass + @AfterAll public static void cleanUp() { PROJECT_MANAGER.teardown(); } diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BasicModelTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BasicModelTest.xtend index 1f0d2ade7..7fec83879 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BasicModelTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BasicModelTest.xtend @@ -21,11 +21,11 @@ import org.eclipse.xtext.resource.XtextResource import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper -import org.junit.Ignore -import org.junit.Test +import org.junit.jupiter.api.Disabled +import org.junit.jupiter.api.Test import org.junit.runner.RunWith -import static org.junit.Assert.* +import static org.junit.jupiter.api.Assertions.* @InjectWith(typeof(CheckUiInjectorProvider)) @RunWith(typeof(XtextRunner)) @@ -73,8 +73,8 @@ class BasicModelTest { } /* Tests that Checks documented with ML_COMMENTs have an inferred description field. */ + @Disabled("Fails because DocumentedImplCustom uses the null resource description provider to get the document provider") @Test - @Ignore("Fails because DocumentedImplCustom uses the null resource description provider to get the document provider") def void testInferingOfDescription() { val check = util.getFirstInstanceOf(parser.parse(modelUtil.modelWithCheck), typeof(Check)) assertEquals("No documentation.", check.description) diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java index 83255e3a0..2d85bf954 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java @@ -10,12 +10,13 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.core.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.InputStream; import java.net.MalformedURLException; +import java.net.URISyntaxException; import java.net.URL; import org.eclipse.emf.common.util.URI; @@ -25,7 +26,7 @@ import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.CheckInjectorProvider; @@ -57,8 +58,8 @@ private static class TestScope extends CatalogFromExtensionPointScope { * * @return Some syntactically correct but otherwise meaningless URL. */ - private URL createURL() throws MalformedURLException { - return new URL("http://" + TEST_CATALOG_FILE + TEST_CATALOG_EXTENSION); + private URL createURL() throws MalformedURLException, URISyntaxException { + return new java.net.URI("http://" + TEST_CATALOG_FILE + TEST_CATALOG_EXTENSION).toURL(); } /** @@ -121,7 +122,7 @@ private void assertIterableNotEmpty(final Iterable iterable) { * Tests that querying the same scope twice doesn't make the resource set grow. */ @Test - public void testSameScopeUseTwice() throws MalformedURLException { + void testSameScopeUseTwice() throws MalformedURLException, URISyntaxException { XtextResourceSet rs = new XtextResourceSet(); URL url = createURL(); ModelLocation modelLocation = createModelLocation(url); @@ -140,7 +141,7 @@ public void testSameScopeUseTwice() throws MalformedURLException { * Tests that querying two different scopes doesn't make the resource set grow. That one was the real cause of bug AIG-1314. */ @Test - public void testDifferentScopeUseTwice() throws MalformedURLException { + void testDifferentScopeUseTwice() throws MalformedURLException, URISyntaxException { XtextResourceSet rs = new XtextResourceSet(); URL url = createURL(); ModelLocation modelLocation = createModelLocation(url); diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig830.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig830.xtend index e5c57fde4..a9d187313 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig830.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig830.xtend @@ -19,8 +19,8 @@ import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.eclipse.xtext.xbase.XbasePackage -import org.junit.Assert -import org.junit.Test +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @InjectWith(typeof(CheckUiInjectorProvider)) diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugDsl27.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugDsl27.java index fc357d6b2..bd18084db 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugDsl27.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugDsl27.java @@ -15,7 +15,7 @@ import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.CheckInjectorProvider; @@ -31,8 +31,8 @@ public class BugDsl27 extends AbstractCheckGenerationTestCase { /** * Tests that our test source compiles fine. */ - @Test - public void testGeneratedCodeHasNoErrors() { + @org.junit.jupiter.api.Test + void testGeneratedCodeHasNoErrors() { try (InputStream sourceStream = BugDsl27.class.getResourceAsStream("bugdsl27/BugDsl27")) { generateAndCompile(sourceStream); } catch (IOException exception) { diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/CheckScopingTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/CheckScopingTest.xtend index 7433dd641..bab88e16c 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/CheckScopingTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/CheckScopingTest.xtend @@ -22,7 +22,7 @@ import java.util.List import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @InjectWith(typeof(CheckUiInjectorProvider)) diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/IssueCodeToLabelMapGenerationTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/IssueCodeToLabelMapGenerationTest.xtend index c5b381b55..57ba171a8 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/IssueCodeToLabelMapGenerationTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/IssueCodeToLabelMapGenerationTest.xtend @@ -15,7 +15,7 @@ import com.avaloq.tools.ddk.check.CheckInjectorProvider import java.io.ByteArrayInputStream import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import java.util.List import org.eclipse.xtext.xbase.testing.JavaSource diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/ProjectBasedTests.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/ProjectBasedTests.xtend index 10d3b47e0..a822bfdca 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/ProjectBasedTests.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/ProjectBasedTests.xtend @@ -20,7 +20,7 @@ import org.eclipse.core.resources.IProject import org.eclipse.core.resources.IResource import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/formatting/CheckFormattingTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/formatting/CheckFormattingTest.xtend index 4b7f8c067..247a07477 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/formatting/CheckFormattingTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/formatting/CheckFormattingTest.xtend @@ -18,7 +18,7 @@ import org.eclipse.xtext.preferences.MapBasedPreferenceValues import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.formatter.FormatterTestHelper -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @InjectWith(typeof(CheckUiInjectorProvider)) diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend index 40b8fe54f..6e00a7bc6 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/imports/test/CheckRewritableImportSectionFactoryTest.xtend @@ -19,7 +19,7 @@ import org.eclipse.emf.common.util.URI import org.eclipse.emf.ecore.EObject import org.eclipse.xtext.resource.XtextResource import org.eclipse.xtext.testing.XtextRunner -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import static org.mockito.Mockito.mock diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckApiAccessValidationsTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckApiAccessValidationsTest.xtend index 37f141b58..ca4b53ffe 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckApiAccessValidationsTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckApiAccessValidationsTest.xtend @@ -13,7 +13,7 @@ import org.eclipse.xtext.testing.InjectWith import org.junit.runner.RunWith import org.eclipse.xtext.testing.XtextRunner import com.avaloq.tools.ddk.check.CheckUiInjectorProvider -import org.junit.Test +import org.junit.jupiter.api.Test import com.google.inject.Inject import org.eclipse.xtext.testing.util.ParseHelper import com.avaloq.tools.ddk.check.check.CheckCatalog diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckJavaValidatorUtilTest.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckJavaValidatorUtilTest.java index af865e5af..bc7159d80 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckJavaValidatorUtilTest.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckJavaValidatorUtilTest.java @@ -10,17 +10,17 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.validation; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.eclipse.core.runtime.IStatus; import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.CheckUiInjectorProvider; import com.google.inject.Inject; -import junit.framework.TestCase; - /** * Tests for com.avaloq.tools.ddk.check.validation.CheckJavaValidatorUtil. @@ -28,7 +28,7 @@ @InjectWith(CheckUiInjectorProvider.class) @RunWith(XtextRunner.class) -public class CheckJavaValidatorUtilTest extends TestCase { +public class CheckJavaValidatorUtilTest { // assertion messages. private static final String STARTS_WITH_LOWER_CASE = "starts with lower case"; @@ -64,7 +64,7 @@ public class CheckJavaValidatorUtilTest extends TestCase { * Tests checkProjectName. The given values are valid. */ @Test - public void projectNameIsValid() { + void projectNameIsValid() { assertTrue(QUALIFIED_NAME, util.checkProjectName("project.name").isOK()); assertTrue(NON_QUALIFIED_NAME, util.checkProjectName("projectname").isOK()); } @@ -73,7 +73,7 @@ public void projectNameIsValid() { * Tests checkProjectName. The given values are invalid. */ @Test - public void projectNameIsInvalid() { + void projectNameIsInvalid() { assertTrue(NAME_IS_EMPTY, util.checkProjectName(EMPTY_STRING).matches(IStatus.ERROR)); assertTrue(STARTS_WITH_UPPERCASE_LETTER, util.checkProjectName("Project.name").matches(IStatus.ERROR)); assertTrue(STARTS_WITH_ILLEGAL_CHARACTER_DOT, util.checkProjectName(".projectname").matches(IStatus.ERROR)); @@ -88,7 +88,7 @@ public void projectNameIsInvalid() { */ @Test - public void packageNameIsValid() { + void packageNameIsValid() { assertTrue(QUALIFIED_NAME, util.checkPackageName("package.name").isOK()); assertTrue(NON_QUALIFIED_NAME, util.checkPackageName("packagename").isOK()); } @@ -98,7 +98,7 @@ public void packageNameIsValid() { */ @Test - public void packageNameIsInvalid() { + void packageNameIsInvalid() { assertTrue(NAME_IS_EMPTY, util.checkPackageName(EMPTY_STRING).matches(IStatus.ERROR)); assertTrue(STARTS_WITH_UPPERCASE_LETTER, util.checkPackageName("Package.name").matches(IStatus.ERROR)); assertTrue(STARTS_WITH_ILLEGAL_CHARACTER_DOT, util.checkPackageName(".packagename").matches(IStatus.ERROR)); @@ -112,7 +112,7 @@ public void packageNameIsInvalid() { * Tests checkCatalogName. The given values are valid. */ @Test - public void catalogNameIsValid() { + void catalogNameIsValid() { assertTrue(STARTS_WITH_UPPERCASE_LETTER, util.checkCatalogName("Catalogname").isOK()); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCatalogName("CatalogName").isOK()); } @@ -121,7 +121,7 @@ public void catalogNameIsValid() { * Tests checkCatalogName. The given values are invalid. */ @Test - public void catalogNameIsInvalid() { + void catalogNameIsInvalid() { assertTrue(NAME_IS_EMPTY, util.checkCatalogName(EMPTY_STRING).matches(IStatus.ERROR)); assertTrue(QUALIFIED_NAME, util.checkCatalogName("Catalog.Name").matches(IStatus.ERROR)); assertTrue(CONTAINS_ILLEGAL_CHARACTER, util.checkCatalogName(",Catalogname").matches(IStatus.ERROR)); @@ -132,7 +132,7 @@ public void catalogNameIsInvalid() { * Tests checkCatalogName. The given values are discouraged. */ @Test - public void catalogNameIsDiscouraged() { + void catalogNameIsDiscouraged() { assertTrue(STARTS_WITH_LOWER_CASE, util.checkCatalogName("catalogname").matches(IStatus.WARNING)); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCatalogName("catalogName").matches(IStatus.WARNING)); } @@ -141,7 +141,7 @@ public void catalogNameIsDiscouraged() { * Tests checkCheckName. The given values are valid. */ @Test - public void checkNameIsValid() { + void checkNameIsValid() { assertTrue(STARTS_WITH_UPPERCASE_LETTER, util.checkCheckName("Checkname").isOK()); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCheckName("CheckName").isOK()); } @@ -150,7 +150,7 @@ public void checkNameIsValid() { * Tests checkCheckName. The given values are invalid. */ @Test - public void checkNameIsInvalid() { + void checkNameIsInvalid() { assertTrue(NAME_IS_EMPTY, util.checkCheckName(EMPTY_STRING).matches(IStatus.ERROR)); assertTrue(QUALIFIED_NAME, util.checkCheckName("Check.name").matches(IStatus.ERROR)); assertTrue(CONTAINS_ILLEGAL_CHARACTER, util.checkCheckName(",checkname").matches(IStatus.ERROR)); @@ -161,7 +161,7 @@ public void checkNameIsInvalid() { * Tests checkCheckName. The given values are discouraged. */ @Test - public void checkNameIsDiscouraged() { + void checkNameIsDiscouraged() { assertTrue(STARTS_WITH_LOWER_CASE, util.checkCheckName("checkname").matches(IStatus.WARNING)); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCheckName("checkName").matches(IStatus.WARNING)); @@ -171,7 +171,7 @@ public void checkNameIsDiscouraged() { * Tests checkCategoryName. The given values are valid. */ @Test - public void categoryNameIsValid() { + void categoryNameIsValid() { assertTrue(STARTS_WITH_UPPERCASE_LETTER, util.checkCategoryName("Categoryname").isOK()); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCategoryName("CategoryName").isOK()); } @@ -180,7 +180,7 @@ public void categoryNameIsValid() { * Tests checkCategoryName. The given values are invalid. */ @Test - public void categoryNameIsInvalid() { + void categoryNameIsInvalid() { assertTrue(NAME_IS_EMPTY, util.checkCategoryName(EMPTY_STRING).matches(IStatus.ERROR)); assertTrue(QUALIFIED_NAME, util.checkCategoryName("Category.name").matches(IStatus.ERROR)); assertTrue(CONTAINS_ILLEGAL_CHARACTER, util.checkCategoryName("%categoryname").matches(IStatus.ERROR)); @@ -191,7 +191,7 @@ public void categoryNameIsInvalid() { * Tests checkCategoryName. The given values are discouraged. */ @Test - public void categoryNameIsDiscouraged() { + void categoryNameIsDiscouraged() { assertTrue(STARTS_WITH_LOWER_CASE, util.checkCategoryName("categoryname").matches(IStatus.WARNING)); assertTrue(STARTS_WITH_AND_CONTAINS_UPPERCASE_LETTERS, util.checkCategoryName("categoryName").matches(IStatus.WARNING)); } diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckValidationTest.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckValidationTest.xtend index 340eb56c3..1599d26f5 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckValidationTest.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/validation/CheckValidationTest.xtend @@ -20,8 +20,8 @@ import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.eclipse.xtext.testing.validation.ValidationTestHelper import org.eclipse.xtext.xbase.XbasePackage$Literals -import org.junit.Ignore -import org.junit.Test +import org.junit.jupiter.api.Disabled +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import com.avaloq.tools.ddk.check.validation.IssueCodes import com.avaloq.tools.ddk.check.check.CheckPackage @@ -96,8 +96,8 @@ class CheckValidationTest { } /* Tests checkContextTypeIsUnique(Check) */ + @Disabled("Tests do not work because of scoping issues at run-time") @Test - @Ignore("Tests do not work because of scoping issues at run-time") def void testContextTypeIsUnique() { // should fail var contexts = Lists::newArrayList("for C c {issue}", "for C d {issue}") diff --git a/com.avaloq.tools.ddk.check.core/.classpath b/com.avaloq.tools.ddk.check.core/.classpath index d0bab55ad..0c82b2437 100644 --- a/com.avaloq.tools.ddk.check.core/.classpath +++ b/com.avaloq.tools.ddk.check.core/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.core/META-INF/MANIFEST.MF index 1cb589b08..ebb17a12d 100644 --- a/com.avaloq.tools.ddk.check.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.core/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.core Bundle-SymbolicName: com.avaloq.tools.ddk.check.core;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.xtext.generator, diff --git a/com.avaloq.tools.ddk.check.core/pom.xml b/com.avaloq.tools.ddk.check.core/pom.xml index a712e712f..aafce7d12 100644 --- a/com.avaloq.tools.ddk.check.core/pom.xml +++ b/com.avaloq.tools.ddk.check.core/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.check.ide/.classpath b/com.avaloq.tools.ddk.check.ide/.classpath index 8ad1f7818..5a4d66ff3 100644 --- a/com.avaloq.tools.ddk.check.ide/.classpath +++ b/com.avaloq.tools.ddk.check.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.ide/META-INF/MANIFEST.MF index eaff29ebe..f32365b18 100644 --- a/com.avaloq.tools.ddk.check.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.ide Bundle-SymbolicName: com.avaloq.tools.ddk.check.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.check.core, com.avaloq.tools.ddk.check.runtime.core, diff --git a/com.avaloq.tools.ddk.check.ide/pom.xml b/com.avaloq.tools.ddk.check.ide/pom.xml index a077d69ba..3723c1e51 100644 --- a/com.avaloq.tools.ddk.check.ide/pom.xml +++ b/com.avaloq.tools.ddk.check.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.check.lib/.classpath b/com.avaloq.tools.ddk.check.lib/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.check.lib/.classpath +++ b/com.avaloq.tools.ddk.check.lib/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.check.lib/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.lib/META-INF/MANIFEST.MF index db417c700..260788036 100644 --- a/com.avaloq.tools.ddk.check.lib/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.lib/META-INF/MANIFEST.MF @@ -2,11 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.lib Bundle-SymbolicName: com.avaloq.tools.ddk.check.lib -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG Require-Bundle: org.eclipse.core.runtime, org.eclipse.xtext, com.avaloq.tools.ddk.xtext -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check.lib Automatic-Module-Name: com.avaloq.tools.ddk.check.lib diff --git a/com.avaloq.tools.ddk.check.lib/pom.xml b/com.avaloq.tools.ddk.check.lib/pom.xml index 0edd978ca..734ed26f7 100644 --- a/com.avaloq.tools.ddk.check.lib/pom.xml +++ b/com.avaloq.tools.ddk.check.lib/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/.classpath b/com.avaloq.tools.ddk.check.runtime.core.test/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/.classpath +++ b/com.avaloq.tools.ddk.check.runtime.core.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/CheckRuntimeTestSuite.launch b/com.avaloq.tools.ddk.check.runtime.core.test/CheckRuntimeTestSuite.launch index 2f7e0d59a..c1f082532 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/CheckRuntimeTestSuite.launch +++ b/com.avaloq.tools.ddk.check.runtime.core.test/CheckRuntimeTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.runtime.core.test/META-INF/MANIFEST.MF index 4d7371208..13c24b253 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.runtime.core.test/META-INF/MANIFEST.MF @@ -2,16 +2,17 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.runtime.core.test Bundle-SymbolicName: com.avaloq.tools.ddk.check.runtime.core.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.xtext, - com.avaloq.tools.ddk.test.ui, + com.avaloq.tools.ddk.test.ui, com.avaloq.tools.ddk.check.runtime.core, - org.junit, - com.google.guava + org.junit.jupiter.api, + com.google.guava, + junit-jupiter-api Export-Package: com.avaloq.tools.ddk.check.runtime.test.core Import-Package: org.mockito, org.mockito.stubbing diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/pom.xml b/com.avaloq.tools.ddk.check.runtime.core.test/pom.xml index 71641f88e..9a76a8b05 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/pom.xml +++ b/com.avaloq.tools.ddk.check.runtime.core.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/context/CheckContextTest.java b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/context/CheckContextTest.java index a63a7ea41..2da235840 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/context/CheckContextTest.java +++ b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/context/CheckContextTest.java @@ -11,16 +11,14 @@ package com.avaloq.tools.ddk.check.runtime.context; import org.eclipse.emf.ecore.EObject; -import org.junit.Assert; -import org.junit.Test; - -import junit.framework.TestCase; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; /** * Provides some tests of the reflective {@link AbstractCheckContext} framework. */ -public class CheckContextTest extends TestCase { +public class CheckContextTest { public static final String ENABLED_ISSUE_CODE = "Enabled.Issue.Code"; public static final String DISABLED_ISSUE_CODE = "Disabled.Issue.Code"; @@ -33,13 +31,13 @@ public class CheckContextTest extends TestCase { * Tests that the {@link DummyCheckContext} properly marks issue codes as enabled and disabled. */ @Test - public void testIssuesEnabledDisabled() { + void testIssuesEnabledDisabled() { ICheckContext checkContext = new DummyCheckContext(); - Assert.assertTrue("Check an issue code in annotations but enabled is still enabled", checkContext.isCheckValid(DUMMY_CONTEXT, ENABLED_ISSUE_CODE)); - Assert.assertTrue("Check an issue code not in any annotations is still enabled", checkContext.isCheckValid(DUMMY_CONTEXT, NOT_MENTIONED_ISSUE_CODE)); - Assert.assertFalse("Check an issue code in annotations is disabled", checkContext.isCheckValid(DUMMY_CONTEXT, DISABLED_ISSUE_CODE)); - Assert.assertFalse("Check disabling has priority over enabling", checkContext.isCheckValid(DUMMY_CONTEXT, DISABLED_AND_ENABLED_ISSUE_CODE)); - Assert.assertFalse("Check disabling has priority over enabling, using different order", checkContext.isCheckValid(DUMMY_CONTEXT, ENABLED_AND_DISABLED_ISSUE_CODE)); + Assertions.assertTrue("Check an issue code in annotations but enabled is still enabled", checkContext.isCheckValid(DUMMY_CONTEXT, ENABLED_ISSUE_CODE)); + Assertions.assertTrue("Check an issue code not in any annotations is still enabled", checkContext.isCheckValid(DUMMY_CONTEXT, NOT_MENTIONED_ISSUE_CODE)); + Assertions.assertFalse("Check an issue code in annotations is disabled", checkContext.isCheckValid(DUMMY_CONTEXT, DISABLED_ISSUE_CODE)); + Assertions.assertFalse("Check disabling has priority over enabling", checkContext.isCheckValid(DUMMY_CONTEXT, DISABLED_AND_ENABLED_ISSUE_CODE)); + Assertions.assertFalse("Check disabling has priority over enabling, using different order", checkContext.isCheckValid(DUMMY_CONTEXT, ENABLED_AND_DISABLED_ISSUE_CODE)); } } diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/registry/CheckExtensionPointTests.java b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/registry/CheckExtensionPointTests.java index 8d01a80d3..e937a5a63 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/registry/CheckExtensionPointTests.java +++ b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/registry/CheckExtensionPointTests.java @@ -10,24 +10,26 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.runtime.core.registry; +import org.junit.jupiter.api.Assertions.assertNotNull; +import org.junit.jupiter.api.Assertions.assertNull; +import org.junit.jupiter.api.Assertions.fail; + import java.util.List; import java.util.NoSuchElementException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.Platform; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; -import junit.framework.TestCase; - /** * Provides some test cases for the Check extension point. */ -public class CheckExtensionPointTests extends TestCase { +public class CheckExtensionPointTests { private static final String DUMMY_EXTENSION_ID = "com.avaloq.tools.ddk.check.runtime.core.test"; private static final String CHECK_EXTENSION_ID = "com.avaloq.tools.ddk.check.runtime.core"; @@ -85,7 +87,7 @@ private IConfigurationElement findConfigurationElement(final IConfigurationEleme * @see Platform#getExtensionRegistry() */ @Test - public void testExtensionPointIsRegistered() { + void testExtensionPointIsRegistered() { try { findCheckExtensionPoint(findExtensionPoints()); } catch (NoSuchElementException e) { @@ -98,7 +100,7 @@ public void testExtensionPointIsRegistered() { * point. */ @Test - public void testDummyClientRegistered() { + void testDummyClientRegistered() { assertNotNull("Test plugin successfully registered to the check extension point", findCheckExtensionPoint(findExtensionPoints()).getExtension(DUMMY_EXTENSION_ID)); } @@ -106,16 +108,16 @@ public void testDummyClientRegistered() { * Tests that a non-existing client is not registered with the extension * point registry. */ - @Test - public void testInvalidClientNotRegistered() { + @org.junit.jupiter.api.Test + void testInvalidClientNotRegistered() { assertNull("Non-existing client not registered to the check extension point", findCheckExtensionPoint(findExtensionPoints()).getExtension("a.b.c")); } /** * Tests that the check extension point has an attribute {@value #TARGET_CLASS_ATTRIBUTE}. */ - @Test - public void testTargetClassAttributeFound() { + @org.junit.jupiter.api.Test + void testTargetClassAttributeFound() { IExtensionPoint point = findCheckExtensionPoint(findExtensionPoints()); assertNotNull("Found a configuration element with attribute \"targetClass\"", findConfigurationElement(point.getConfigurationElements(), TARGET_CLASS_ATTRIBUTE)); } @@ -123,8 +125,8 @@ public void testTargetClassAttributeFound() { /** * Tests that the check extension point has an attribute {@value #LANGUAGE_ATTRIBUTE}. */ - @Test - public void testLanguageAttributeFound() { + @org.junit.jupiter.api.Test + void testLanguageAttributeFound() { IExtensionPoint point = findCheckExtensionPoint(findExtensionPoints()); assertNotNull("Found a configuration element with attribute \"language\"", findConfigurationElement(point.getConfigurationElements(), LANGUAGE_ATTRIBUTE)); } diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/validation/CheckValidatorTest.java b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/validation/CheckValidatorTest.java index a91a3de53..6ed9bf1d2 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/validation/CheckValidatorTest.java +++ b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/core/validation/CheckValidatorTest.java @@ -10,9 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.runtime.core.validation; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.check.runtime.issue.ICheckValidatorImpl; import com.avaloq.tools.ddk.check.runtime.validation.AbstractCheckValidator; @@ -44,8 +44,8 @@ protected String getHostLanguage() { * * @see {@link com.avaloq.tools.ddk.check.extensionpoint.test.validation.DummyValidator} */ - @Test - public void testAtLeastOneValidatorFound() { + @org.junit.jupiter.api.Test + void testAtLeastOneValidatorFound() { ICheckValidatorImpl dummyValidator = Iterables.getOnlyElement(getValidators(Maps.newHashMap(), null)); assertEquals("Dummy validator found", "DummyValidator", dummyValidator.getClass().getSimpleName()); } diff --git a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/label/CheckRuleLabelProviderTest.java b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/label/CheckRuleLabelProviderTest.java index 290ad8d6d..2bae132c7 100644 --- a/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/label/CheckRuleLabelProviderTest.java +++ b/com.avaloq.tools.ddk.check.runtime.core.test/src/com/avaloq/tools/ddk/check/runtime/label/CheckRuleLabelProviderTest.java @@ -10,9 +10,9 @@ package com.avaloq.tools.ddk.check.runtime.label; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -23,9 +23,9 @@ import java.util.Collections; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.check.runtime.issue.ICheckValidatorImpl; import com.avaloq.tools.ddk.check.runtime.registry.ICheckValidatorRegistry; @@ -72,7 +72,7 @@ public class CheckRuleLabelProviderTest { /** * Setup done before each test. */ - @Before + @BeforeEach public void setUp() { // Create mocks @@ -97,7 +97,7 @@ protected void configure() { /** * Teardown done after each test. */ - @After + @AfterEach public void tearDown() { mockCheckValidatorRegistry = null; @@ -127,7 +127,7 @@ private void mockValidatorsWithChecks() { * Test the default binding. */ @Test - public void testBinding() { + void testBinding() { // ASSERT assertSame("Binding of label provider incorrect.", CheckRuleLabelProvider.class, checkRuleLabelProvider.getClass()); } @@ -135,8 +135,8 @@ public void testBinding() { /** * Test successfully getting a check label. */ - @Test - public void testSuccess() { + @org.junit.jupiter.api.Test + void testSuccess() { // ARRANGE mockValidatorsWithChecks(); @@ -164,8 +164,8 @@ public void testWhenIssueCodeNotPresent() { /** * Test trying to get the check label for a null issue code. */ - @Test - public void testWithNullID() { + @org.junit.jupiter.api.Test + void testWithNullID() { // ARRANGE mockValidatorsWithChecks(); @@ -180,7 +180,7 @@ public void testWithNullID() { * Test trying to get a check label when there are no validators. */ @Test - public void testWithNoValidators() { + void testWithNoValidators() { // ARRANGE when(mockCheckValidatorRegistry.getValidators()).thenReturn(Collections.emptyList()); @@ -194,8 +194,8 @@ public void testWithNoValidators() { /** * Test trying to get a check label when there are no checks registered. */ - @Test - public void testWithNoChecks() { + @org.junit.jupiter.api.Test + void testWithNoChecks() { // ARRANGE when(mockCheckValidatorRegistry.getValidators()).thenReturn(mockValidators); for (ICheckValidatorImpl mockValidator : mockValidators) { @@ -212,8 +212,8 @@ public void testWithNoChecks() { /** * Test trying to get the check label for an issue code which is not a check issue code. */ - @Test - public void testWhenIssueCodeIsNotACheckIssueCode() { + @org.junit.jupiter.api.Test + void testWhenIssueCodeIsNotACheckIssueCode() { // ARRANGE final String notACheckIssueCode = "package.name.SomeOtherClass.issue.code"; @@ -232,8 +232,8 @@ public void testWhenIssueCodeIsNotACheckIssueCode() { /** * Test that check labels are cached. */ - @Test - public void testCaching() { + @org.junit.jupiter.api.Test + void testCaching() { // ARRANGE mockValidatorsWithChecks(); @@ -266,8 +266,8 @@ public void publicInvalidateCache() { /** * Test that the cache can be invalidated by subclasses. */ - @Test - public void testInvalidatingCache() { + @org.junit.jupiter.api.Test + void testInvalidatingCache() { // ARRANGE final CheckRuleLabelProviderWithInvalidateCacheExposed checkRuleLabelProviderWithInvalidateCacheExposed = injector.getInstance(CheckRuleLabelProviderWithInvalidateCacheExposed.class); @@ -290,8 +290,8 @@ public void testInvalidatingCache() { /** * Test that the class is bound as a singleton. */ - @Test - public void testClassIsSingleton() { + @org.junit.jupiter.api.Test + void testClassIsSingleton() { // ACT final ICheckRuleLabelProvider otherCheckRuleLabelProvider = injector.getInstance(CheckRuleLabelProvider.class); diff --git a/com.avaloq.tools.ddk.check.runtime.core/.classpath b/com.avaloq.tools.ddk.check.runtime.core/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/.classpath +++ b/com.avaloq.tools.ddk.check.runtime.core/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.check.runtime.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.runtime.core/META-INF/MANIFEST.MF index 0be705048..53b03aed5 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.runtime.core/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.runtime.core Bundle-SymbolicName: com.avaloq.tools.ddk.check.runtime.core;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.core.resources, org.eclipse.core.runtime, org.eclipse.xtext, diff --git a/com.avaloq.tools.ddk.check.runtime.core/pom.xml b/com.avaloq.tools.ddk.check.runtime.core/pom.xml index bed2c06cd..bc4c9d855 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/pom.xml +++ b/com.avaloq.tools.ddk.check.runtime.core/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.check.runtime.ui/.classpath b/com.avaloq.tools.ddk.check.runtime.ui/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.check.runtime.ui/.classpath +++ b/com.avaloq.tools.ddk.check.runtime.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.check.runtime.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.runtime.ui/META-INF/MANIFEST.MF index 5aea2dcf2..216ce6264 100644 --- a/com.avaloq.tools.ddk.check.runtime.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.runtime.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.runtime.ui Bundle-SymbolicName: com.avaloq.tools.ddk.check.runtime.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Activator: com.avaloq.tools.ddk.check.runtime.ui.internal.Activator Bundle-Vendor: Avaloq Group AG Require-Bundle: org.eclipse.ui, @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.xtext.ui, com.avaloq.tools.ddk.check.runtime.core, org.eclipse.ui.ide -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Import-Package: org.apache.logging.log4j Export-Package: com.avaloq.tools.ddk.check.runtime.ui.editor, diff --git a/com.avaloq.tools.ddk.check.runtime.ui/pom.xml b/com.avaloq.tools.ddk.check.runtime.ui/pom.xml index 491ba5b45..7c005f570 100644 --- a/com.avaloq.tools.ddk.check.runtime.ui/pom.xml +++ b/com.avaloq.tools.ddk.check.runtime.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath b/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath index 4dbd9052d..1b454394e 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/.classpath @@ -7,7 +7,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/CheckExecutionEnvironmentTestSuite.launch b/com.avaloq.tools.ddk.check.test.runtime.tests/CheckExecutionEnvironmentTestSuite.launch index 8d995662a..155ab47de 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/CheckExecutionEnvironmentTestSuite.launch +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/CheckExecutionEnvironmentTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/CheckLibraryChecksTestSuite.launch b/com.avaloq.tools.ddk.check.test.runtime.tests/CheckLibraryChecksTestSuite.launch index b641c0def..2773f800f 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/CheckLibraryChecksTestSuite.launch +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/CheckLibraryChecksTestSuite.launch @@ -23,7 +23,7 @@ - + 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 bd9e93860..432f9214a 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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.test.runtime.tests Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.check.test.runtime.tests; singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.check.runtime.core, @@ -14,7 +14,7 @@ Require-Bundle: com.avaloq.tools.ddk.check.runtime.core, org.eclipse.xtext, org.eclipse.xtext.testing, org.eclipse.xtext.ui.testing, - org.junit, + org.junit.jupiter.api, org.eclipse.ui.workbench;resolution:=optional, org.eclipse.xtend.lib, org.eclipse.xtext.xbase.lib @@ -24,7 +24,7 @@ Import-Package: org.junit.runner;version="4.5.0", org.junit.runners;version="4.5.0", org.junit.runners.model;version="4.5.0", org.hamcrest.core -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check.test.runtime, com.avaloq.tools.ddk.check.test.runtime.tests, com.avaloq.tools.ddk.check diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml b/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml index 993d1a823..afcfffb92 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckConfigurationIsAppliedTest.xtend b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckConfigurationIsAppliedTest.xtend index 5e7b6983e..48ecfad6a 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckConfigurationIsAppliedTest.xtend +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckConfigurationIsAppliedTest.xtend @@ -23,7 +23,7 @@ import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.validation.ValidationTestHelper import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @InjectWith(typeof(TestLanguageUiInjectorProvider)) diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckExecutionEnvironmentProjectTest.xtend b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckExecutionEnvironmentProjectTest.xtend index 97ee56ff3..2afef11d8 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckExecutionEnvironmentProjectTest.xtend +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/CheckExecutionEnvironmentProjectTest.xtend @@ -22,7 +22,7 @@ import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.eclipse.xtext.testing.validation.ValidationTestHelper -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @InjectWith(typeof(TestLanguageUiInjectorProvider)) diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/label/IssueLabelTest.xtend b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/label/IssueLabelTest.xtend index 8d485dff3..7071adcfc 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/label/IssueLabelTest.xtend +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/src/com/avaloq/tools/ddk/check/test/runtime/label/IssueLabelTest.xtend @@ -15,10 +15,10 @@ import com.avaloq.tools.ddk.check.runtime.label.ICheckRuleLabelProvider import com.avaloq.tools.ddk.check.validation.LibraryChecksIssueCodes import com.google.inject.AbstractModule import com.google.inject.Guice -import org.junit.Test +import org.junit.jupiter.api.Test -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertNotNull +import static org.junit.jupiter.api.Assertions.assertEquals +import static org.junit.jupiter.api.Assertions.assertNotNull /** * End-to-end test for getting Check labels. diff --git a/com.avaloq.tools.ddk.check.test.runtime.ui/.classpath b/com.avaloq.tools.ddk.check.test.runtime.ui/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.ui/.classpath +++ b/com.avaloq.tools.ddk.check.test.runtime.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.test.runtime.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.test.runtime.ui/META-INF/MANIFEST.MF index 038dfa406..63e9fff06 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.test.runtime.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.test.runtime.ui Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.check.test.runtime.ui; singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.check.test.runtime;visibility:=reexport, @@ -20,7 +20,7 @@ Require-Bundle: com.avaloq.tools.ddk.check.test.runtime;visibility:=reexport, org.apache.log4j Import-Package: org.apache.commons.logging, org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check.ui.contentassist.antlr, com.avaloq.tools.ddk.check.ui.internal, com.avaloq.tools.ddk.check.ui.contentassist, diff --git a/com.avaloq.tools.ddk.check.test.runtime.ui/pom.xml b/com.avaloq.tools.ddk.check.test.runtime.ui/pom.xml index bedeb9368..ef8613579 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.ui/pom.xml +++ b/com.avaloq.tools.ddk.check.test.runtime.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.test.runtime/.classpath b/com.avaloq.tools.ddk.check.test.runtime/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/.classpath +++ b/com.avaloq.tools.ddk.check.test.runtime/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.test.runtime/GenerateTestLanguage.mwe2.launch b/com.avaloq.tools.ddk.check.test.runtime/GenerateTestLanguage.mwe2.launch index 23ce20710..4080a91c7 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/GenerateTestLanguage.mwe2.launch +++ b/com.avaloq.tools.ddk.check.test.runtime/GenerateTestLanguage.mwe2.launch @@ -8,7 +8,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.test.runtime/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.test.runtime/META-INF/MANIFEST.MF index f3ebdc922..d75901fb6 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.test.runtime/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.test.runtime Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.check.test.runtime;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext;visibility:=reexport, @@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport, Import-Package: org.apache.log4j, org.apache.logging.log4j, org.eclipse.xtext.xbase.lib -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check, com.avaloq.tools.ddk.check.formatting, com.avaloq.tools.ddk.check.generator, diff --git a/com.avaloq.tools.ddk.check.test.runtime/pom.xml b/com.avaloq.tools.ddk.check.test.runtime/pom.xml index fc06599c8..9d24accda 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/pom.xml +++ b/com.avaloq.tools.ddk.check.test.runtime/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/ExecutionEnvironmentCheckCatalog.java b/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/ExecutionEnvironmentCheckCatalog.java index 88bfb0b8d..9884759c0 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/ExecutionEnvironmentCheckCatalog.java +++ b/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/ExecutionEnvironmentCheckCatalog.java @@ -17,7 +17,7 @@ public class ExecutionEnvironmentCheckCatalog extends AbstractIssue { @Inject private ICheckConfigurationStoreService checkConfigurationStoreService; - private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builder() + private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builderWithExpectedSize(2) .put(ExecutionEnvironmentIssueCodes.FRANZNAME, "Greeting name length") .put(ExecutionEnvironmentIssueCodes.NAMELENGTH, "Greeting name length") .build() diff --git a/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/LibraryChecksCheckCatalog.java b/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/LibraryChecksCheckCatalog.java index b9c554c56..737337e7a 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/LibraryChecksCheckCatalog.java +++ b/com.avaloq.tools.ddk.check.test.runtime/src-gen/com/avaloq/tools/ddk/check/validation/LibraryChecksCheckCatalog.java @@ -18,7 +18,7 @@ public class LibraryChecksCheckCatalog extends AbstractIssue { @Inject private ICheckConfigurationStoreService checkConfigurationStoreService; - private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builder() + private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builderWithExpectedSize(4) .put(LibraryChecksIssueCodes.CACHE_DOESNT_WORK, "Cache doesn't work") .put(LibraryChecksIssueCodes.CACHE_INJECTION_FAILED, "Cache injection failed") .put(LibraryChecksIssueCodes.CHECK_CATALOG_IS_ACTIVE, "Check catalog is active") diff --git a/com.avaloq.tools.ddk.check.ui.test/.classpath b/com.avaloq.tools.ddk.check.ui.test/.classpath index aaafcc186..aa502e196 100644 --- a/com.avaloq.tools.ddk.check.ui.test/.classpath +++ b/com.avaloq.tools.ddk.check.ui.test/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.ui.test/CheckUiTestSuite.launch b/com.avaloq.tools.ddk.check.ui.test/CheckUiTestSuite.launch index 04e7490f3..8a8daff4b 100644 --- a/com.avaloq.tools.ddk.check.ui.test/CheckUiTestSuite.launch +++ b/com.avaloq.tools.ddk.check.ui.test/CheckUiTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.check.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.ui.test/META-INF/MANIFEST.MF index 66dc1a27a..81dda2b87 100644 --- a/com.avaloq.tools.ddk.check.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.ui.test/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.ui.test Bundle-SymbolicName: com.avaloq.tools.ddk.check.ui.test -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.junit, +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Require-Bundle: org.junit.jupiter.api, com.avaloq.tools.ddk.check.ui, com.avaloq.tools.ddk.xtext.test.core, com.avaloq.tools.ddk.test.core, @@ -20,7 +20,9 @@ Require-Bundle: org.junit, org.eclipse.xtext.xbase.lib, org.eclipse.core.runtime, org.eclipse.ui.workbench;resolution:=optional, - org.objectweb.asm;resolution:=optional + org.objectweb.asm;resolution:=optional, + junit-jupiter-api, + org.junit Export-Package: com.avaloq.tools.ddk.check.ui.test, com.avaloq.tools.ddk.check.ui.test.util, com.avaloq.tools.ddk.check diff --git a/com.avaloq.tools.ddk.check.ui.test/pom.xml b/com.avaloq.tools.ddk.check.ui.test/pom.xml index e9ace62e2..58a932b6b 100644 --- a/com.avaloq.tools.ddk.check.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.check.ui.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckCatalogWizardTest.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckCatalogWizardTest.java index 06fef0015..8ac55d3bb 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckCatalogWizardTest.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckCatalogWizardTest.java @@ -11,8 +11,8 @@ package com.avaloq.tools.ddk.check.ui.test; import static com.avaloq.tools.ddk.test.ui.swtbot.util.SwtBotWizardUtil.selectProjectFolder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; import java.lang.reflect.InvocationTargetException; import java.util.Collections; @@ -33,9 +33,9 @@ import org.eclipse.xtext.Grammar; import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.ui.util.PluginProjectFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.ui.test.internal.CheckWizardUiTestInjectorProvider; @@ -116,7 +116,7 @@ protected void execute(final IProgressMonitor monitor) throws CoreException, Inv * Initializes this test class pre-loading grammar access instances, which might involve bundle activation and class loading. *

*/ - @Before + @BeforeEach public void setUp() { wizard = new SwtWizardBot(); project = createProject(); @@ -137,7 +137,7 @@ private void initializeWizardBot() { * Test if the package field contains the selected package. */ @Test - public void testPackageSelected() { + void testPackageSelected() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); initializeWizardBot(); // because the selected item is a package initially, this package is shown in the field. @@ -148,7 +148,7 @@ public void testPackageSelected() { * Test if catalog wizard is enabled if a project folder is selected. */ @Test - public void testCheckCatalogWizardIsEnabled() { + void testCheckCatalogWizardIsEnabled() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); // open the check catalog wizard after having selected the project source folder. // that way, the wizard page should be enabled. @@ -164,7 +164,7 @@ public void testCheckCatalogWizardIsEnabled() { * Test if the package field is empty, if the selected item is no package. */ @Test - public void testInitiallyNoPackageSelected() { + void testInitiallyNoPackageSelected() { selectProjectFolder(wizard, SRC_FOLDER); initializeWizardBot(); @@ -176,7 +176,7 @@ public void testInitiallyNoPackageSelected() { * Test if the next and finish button are disabled if the package name is invalid. */ @Test - public void testPackageNameInvalid() { + void testPackageNameInvalid() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); // open the check catalog wizard after having selected the project source folder. initializeWizardBot(); @@ -192,7 +192,7 @@ public void testPackageNameInvalid() { * Test if the finish button is enabled if the package name is valid. */ @Test - public void testPackageNameValid() { + void testPackageNameValid() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); // open the check catalog wizard after having selected the project source folder. initializeWizardBot(); @@ -205,7 +205,7 @@ public void testPackageNameValid() { * Test if the next and finish button are disabled if the catalog name is invalid. */ @Test - public void testCatalogNameInvalid() { + void testCatalogNameInvalid() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); // open the check catalog wizard after having selected the project source folder. initializeWizardBot(); @@ -219,7 +219,7 @@ public void testCatalogNameInvalid() { * Tests that discouraged catalog names are accepted. */ @Test - public void testCatalogNameDiscouraged() { + void testCatalogNameDiscouraged() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); initializeWizardBot(); @@ -232,7 +232,7 @@ public void testCatalogNameDiscouraged() { * Tests valid catalog names. */ @Test - public void testCatalogName() { + void testCatalogName() { selectProjectFolder(wizard, VALID_PACKAGE_NAME); initializeWizardBot(); @@ -258,7 +258,7 @@ public void testInitiallyNoGrammarSelected() { * @throws CoreException * if project doesn't exist. */ - @After + @AfterEach public void tearDown() throws CoreException { wizard.closeWizard(); project.delete(true, new NullProgressMonitor()); diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckProjectWizardTest.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckProjectWizardTest.java index 5261a85cc..c93965205 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckProjectWizardTest.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckProjectWizardTest.java @@ -10,15 +10,16 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.ui.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotSame; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; import org.eclipse.xtext.testing.InjectWith; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.ui.test.internal.CheckWizardUiTestInjectorProvider; @@ -47,7 +48,7 @@ public class CheckProjectWizardTest { /** * Start again the Check project wizard before every test. */ - @Before + @BeforeEach public void setUp() { wizard = new SwtWizardBot(); wizard.openNewWizard(CHECK_PROJECT_WIZARD_NAME); @@ -57,7 +58,7 @@ public void setUp() { * Check if the project wizard is available. */ @Test - public void testCheckProjectWizardIsAvailable() { + void testCheckProjectWizardIsAvailable() { assertNotNull("the project wizard was found", wizard); CheckWizardTestUtil.assertButtonsEnabled(false, true, false, wizard); } @@ -65,8 +66,8 @@ public void testCheckProjectWizardIsAvailable() { /** * Test if the buttons 'next', 'back' and 'finish' are correctly enabled/disabled. */ - @Test - public void testProjectNameInvalid() { + @org.junit.jupiter.api.Test + void testProjectNameInvalid() { CheckWizardTestUtil.projectName(wizard, "", CheckWizardTestUtil.NEXT_DISABLED); CheckWizardTestUtil.projectName(wizard, ".project.name", CheckWizardTestUtil.NEXT_DISABLED); CheckWizardTestUtil.projectName(wizard, "Project.name", CheckWizardTestUtil.NEXT_DISABLED); @@ -87,7 +88,7 @@ public void testFinishButtonDisabledInProjectPage() { * Test if the buttons 'next', 'back' and 'finish' are correctly enabled/disabled. */ @Test - public void testProjectNameValid() { + void testProjectNameValid() { CheckWizardTestUtil.projectName(wizard, "project.name", CheckWizardTestUtil.NEXT_ENABLED); CheckWizardTestUtil.projectName(wizard, "projectname", CheckWizardTestUtil.NEXT_ENABLED); } @@ -96,7 +97,7 @@ public void testProjectNameValid() { * Test if the buttons 'next', 'back' and 'finish' are correctly enabled/disabled. */ @Test - public void fieldValuesAfterPageChange() { + void fieldValuesAfterPageChange() { wizard.writeToTextField(Messages.PROJECT_NAME_LABEL, CORRECT_PROJECT_NAME); wizard.changeToPreviousPage(); wizard.changeToNextPage(); @@ -120,7 +121,7 @@ public void testNextButtonChangesPage() { /** * Close the wizard after every test. */ - @After + @AfterEach public void tearDown() { wizard.closeWizard(); } diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckContextsExtensionTest.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckContextsExtensionTest.java index e46b2b9f1..4ec0e2ceb 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckContextsExtensionTest.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckContextsExtensionTest.java @@ -10,6 +10,10 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.ui.test.builder; +import org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Assertions.assertFalse; +import org.junit.jupiter.api.Assertions.assertTrue; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.CoreException; @@ -18,11 +22,11 @@ import org.eclipse.pde.core.plugin.IPluginExtension; import org.eclipse.pde.core.plugin.IPluginModelBase; import org.eclipse.pde.internal.core.plugin.WorkspacePluginModel; +import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.testing.util.ParseHelper; -import org.eclipse.xtext.testing.InjectWith; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.check.CheckCatalog; @@ -33,8 +37,6 @@ import com.google.common.collect.Lists; import com.google.inject.Inject; -import junit.framework.TestCase; - /** * Tests CheckContextExtensionUtil. @@ -42,7 +44,7 @@ @SuppressWarnings("restriction") @InjectWith(CheckWizardUiTestInjectorProvider.class) @RunWith(XtextRunner.class) -public class CheckContextsExtensionTest extends TestCase { +public class CheckContextsExtensionTest { private static final String CATALOG_WITH_FIRST_CHECK_LIVE = "package com.test catalog c for grammar g { live error \"First Check\"{ for g { issue }}}"; @@ -57,7 +59,7 @@ public class CheckContextsExtensionTest extends TestCase { private IWorkspace workspace; @Override - @Before + @BeforeEach public void setUp() throws Exception { catalog = parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE); IFile pluginxml = workspace.getRoot().getFile(new Path("/test/plugin.xml")); @@ -71,7 +73,7 @@ public void setUp() throws Exception { * core exception */ @Test - public void testCreateExtension() throws CoreException { + void testCreateExtension() throws CoreException { IPluginExtension extension = contextsUtil.addExtensionToPluginBase(pluginModel, catalog, ExtensionType.CONTEXTS, null); // Test if the extension has been created. assertEquals("Contexts extension has been created.", CheckContextsExtensionHelper.CONTEXTS_EXTENSION_POINT_ID, extension.getPoint()); @@ -87,7 +89,7 @@ public void testCreateExtension() throws CoreException { * the core exception */ @Test - public void testIsExtensionUpdateRequiredTrue() throws CoreException { + void testIsExtensionUpdateRequiredTrue() throws CoreException { IPluginExtension extension = createErroneousExtension(); Iterable elements = Iterables.filter(Lists.newArrayList(extension.getChildren()), IPluginElement.class); assertTrue("Extension update is required", contextsUtil.isExtensionUpdateRequired(catalog, extension, elements)); @@ -100,7 +102,7 @@ public void testIsExtensionUpdateRequiredTrue() throws CoreException { * the core exception */ @Test - public void testIsExtensionUpdateRequiredFalse() throws CoreException { + void testIsExtensionUpdateRequiredFalse() throws CoreException { IPluginExtension extension = contextsUtil.addExtensionToPluginBase(pluginModel, catalog, ExtensionType.CONTEXTS, null); Iterable elements = Iterables.filter(Lists.newArrayList(extension.getChildren()), IPluginElement.class); assertFalse("No extension update is required ", contextsUtil.isExtensionUpdateRequired(catalog, extension, elements)); diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckMarkerHelpExtensionTest.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckMarkerHelpExtensionTest.java index cdf20f180..5811eedcf 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckMarkerHelpExtensionTest.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckMarkerHelpExtensionTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.ui.test.builder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; import java.util.Set; @@ -28,7 +28,7 @@ import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.testing.util.ParseHelper; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.check.CheckCatalog; @@ -78,8 +78,8 @@ public class CheckMarkerHelpExtensionTest { * @throws Exception * the exception */ - @Test - public void testCreateExtension() throws Exception { + @org.junit.jupiter.api.Test + void testCreateExtension() throws Exception { IPluginExtension extension = createMarkerHelpExtension(parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE)); // Test if the extension has been created. @@ -98,8 +98,8 @@ public void testCreateExtension() throws Exception { * @throws Exception * the exception */ - @Test - public void testAddElement() throws Exception { + @org.junit.jupiter.api.Test + void testAddElement() throws Exception { final CheckCatalog catalogWithOneCheck = parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE); IPluginExtension extension = createMarkerHelpExtension(catalogWithOneCheck); @@ -123,8 +123,8 @@ public void testAddElement() throws Exception { * @throws Exception * the exception */ - @Test - public void testRemoveElement() throws Exception { + @org.junit.jupiter.api.Test + void testRemoveElement() throws Exception { final CheckCatalog catalogWithTwoChecks = parser.parse(CATALOG_WITH_TWO_CHECKS); IPluginExtension extension = createMarkerHelpExtension(catalogWithTwoChecks); @@ -143,8 +143,8 @@ public void testRemoveElement() throws Exception { * @throws Exception * the exception */ - @Test - public void testMarkerTypeUpdate() throws Exception { + @org.junit.jupiter.api.Test + void testMarkerTypeUpdate() throws Exception { IPluginExtension extension = createMarkerHelpExtension(parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE)); assertEquals("Before update: Markertype is fast.", MARKERTYPE_FAST, ((IPluginElement) extension.getChildren()[0]).getAttribute(CheckMarkerHelpExtensionHelper.MARKERTYPE_ATTRIBUTE_TAG).getValue()); @@ -164,8 +164,8 @@ public void testMarkerTypeUpdate() throws Exception { * @throws Exception * the exception */ - @Test - public void testCheckHasTwoIssueCodes() throws Exception { + @org.junit.jupiter.api.Test + void testCheckHasTwoIssueCodes() throws Exception { IPluginExtension extension = createMarkerHelpExtension(parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE)); CheckCatalog twoIssueCodes = parser.parse(CATALOG_CHECK_HAS_TWO_ISSUECODES); diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckTocExtensionTest.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckTocExtensionTest.java index 13fb54b31..76943c16a 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckTocExtensionTest.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/builder/CheckTocExtensionTest.java @@ -10,7 +10,10 @@ *******************************************************************************/ package com.avaloq.tools.ddk.check.ui.test.builder; -import junit.framework.TestCase; +import org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Assertions.assertFalse; +import org.junit.jupiter.api.Assertions.assertNotSame; +import org.junit.jupiter.api.Assertions.assertTrue; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspace; @@ -23,8 +26,8 @@ import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.testing.util.ParseHelper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.check.check.CheckCatalog; @@ -42,7 +45,7 @@ @SuppressWarnings({"restriction", "PMD.SignatureDeclareThrowsException"}) @InjectWith(CheckWizardUiTestInjectorProvider.class) @RunWith(XtextRunner.class) -public class CheckTocExtensionTest extends TestCase { +public class CheckTocExtensionTest { @Inject private ParseHelper parser; @@ -58,7 +61,7 @@ public class CheckTocExtensionTest extends TestCase { private CheckCatalog catalog; private IPluginModelBase pluginModel; - @Before + @BeforeEach @Override public void setUp() throws Exception { catalog = parser.parse(CATALOG_WITH_FIRST_CHECK_LIVE); @@ -69,12 +72,12 @@ public void setUp() throws Exception { /** * Tests if the toc extension is correctly created. - * + * * @throws CoreException * the core exception */ - @Test - public void testCreateExtension() throws CoreException { + @org.junit.jupiter.api.Test + void testCreateExtension() throws CoreException { IPluginExtension extension = tocUtil.addExtensionToPluginBase(pluginModel, catalog, ExtensionType.CONTEXTS, null); assertEquals("Toc extension has been created", CheckTocExtensionHelper.TOC_EXTENSION_POINT_ID, extension.getPoint()); assertEquals("Toc extension name is correct", tocUtil.getExtensionPointName(catalog), extension.getName()); @@ -84,12 +87,12 @@ public void testCreateExtension() throws CoreException { /** * Tests if isExtensionUpdateRequired returns true if only an erroneous extension exists for the check catalog. - * + * * @throws CoreException * the core exception */ - @Test - public void testIsExtensionUpdateRequiredTrue() throws CoreException { + @org.junit.jupiter.api.Test + void testIsExtensionUpdateRequiredTrue() throws CoreException { IPluginExtension extension = createErroneousTocExtension(); Iterable elements = Iterables.filter(Lists.newArrayList(extension.getChildren()), IPluginElement.class); @@ -98,7 +101,7 @@ public void testIsExtensionUpdateRequiredTrue() throws CoreException { /** * Creates an erroneous toc extension. - * + * * @return the plugin extension * @throws CoreException * the core exception @@ -116,12 +119,12 @@ private IPluginExtension createErroneousTocExtension() throws CoreException { /** * Tests if an update of a toc extension is correctly done. - * + * * @throws CoreException * the core exception */ @Test - public void testUpdateTocExtension() throws CoreException { + void testUpdateTocExtension() throws CoreException { IPluginExtension extension = createErroneousTocExtension(); assertNotSame("File location is not as expected", CheckTocExtensionHelper.TOC_FILE_NAME, ((IPluginElement) extension.getChildren()[0]).getAttribute("file").getValue()); tocUtil.updateExtension(catalog, extension); @@ -130,12 +133,12 @@ public void testUpdateTocExtension() throws CoreException { /** * Tests if isExtensionUpdateRequires returns false if a correct extension already exists. - * + * * @throws CoreException * the core exception */ @Test - public void testIsExtensionUpdateRequiredFalse() throws CoreException { + void testIsExtensionUpdateRequiredFalse() throws CoreException { IPluginExtension extension = tocUtil.addExtensionToPluginBase(pluginModel, catalog, ExtensionType.CONTEXTS, null); Iterable elements = Iterables.filter(Lists.newArrayList(extension.getChildren()), IPluginElement.class); assertFalse("No toc extension update is required", tocUtil.isExtensionUpdateRequired(catalog, extension, elements)); diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/contentassist/BugAig931Test.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/contentassist/BugAig931Test.java index 85dce9ec8..38549a696 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/contentassist/BugAig931Test.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/contentassist/BugAig931Test.java @@ -20,8 +20,8 @@ import org.eclipse.osgi.util.NLS; import org.eclipse.ui.progress.UIJob; import org.eclipse.xtext.common.types.access.jdt.IJavaProjectProvider; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import com.google.common.base.Function; import com.google.common.collect.Iterables; @@ -51,7 +51,7 @@ public String apply(final ICompletionProposal input) { } })); for (String string : expected) { - Assert.assertTrue(NLS.bind("Expected {0} but found {1}", Arrays.toString(expected), actual), actual.contains(string)); + Assertions.assertTrue(NLS.bind("Expected {0} but found {1}", Arrays.toString(expected), actual), actual.contains(string)); } } @@ -62,7 +62,7 @@ public String apply(final ICompletionProposal input) { * the exception */ @Test - public void testBugAig931() throws Exception { + void testBugAig931() throws Exception { final String partialModel = "package p catalog T for grammar com.avaloq.tools.ddk.check.Check { error \"X\" for "; final String[] expectedContextTypeProposals = {"EObject - org.eclipse.emf.ecore", "JvmType - org.eclipse.xtext.common.types"}; new UIJob("compute completion proposals") { diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/quickfix/CheckQuickfixTest.xtend b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/quickfix/CheckQuickfixTest.xtend index 00bbade63..16b1081bc 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/quickfix/CheckQuickfixTest.xtend +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/quickfix/CheckQuickfixTest.xtend @@ -19,10 +19,10 @@ import com.avaloq.tools.ddk.test.ui.swtbot.condition.WaitForEquals import com.avaloq.tools.ddk.test.ui.swtbot.util.ProblemsViewTestUtil import org.eclipse.swtbot.swt.finder.widgets.TimeoutException import org.eclipse.xtext.diagnostics.Diagnostic -import org.junit.Assert -import org.junit.Test +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test -import static org.junit.Assert.fail +import static org.junit.jupiter.api.Assertions.fail /** * Test quickfixes for Check files. @@ -95,7 +95,7 @@ class CheckQuickfixTest extends AbstractCheckQuickfixTest { assertHasQuickFix(Diagnostic::LINKING_DIAGNOSTIC, quickfixLabel); assertQuickFixSuccessful(Diagnostic::LINKING_DIAGNOSTIC, quickfixLabel); val afterIssues = getXtextTestUtil().getIssues(getDocument()); - Assert.assertTrue(afterIssues.size < beforeIssues.size); + Assertions.assertTrue(afterIssues.size < beforeIssues.size); } /** diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckWizardTestUtil.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckWizardTestUtil.java index e13c18538..fa35472ac 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckWizardTestUtil.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckWizardTestUtil.java @@ -14,8 +14,8 @@ import static com.avaloq.tools.ddk.test.ui.swtbot.SwtWizardBot.FINISH; import static com.avaloq.tools.ddk.test.ui.swtbot.SwtWizardBot.NEXT; import static org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.syncExec; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swtbot.eclipse.finder.waits.Conditions; diff --git a/com.avaloq.tools.ddk.check.ui/.classpath b/com.avaloq.tools.ddk.check.ui/.classpath index 8ad1f7818..5a4d66ff3 100644 --- a/com.avaloq.tools.ddk.check.ui/.classpath +++ b/com.avaloq.tools.ddk.check.ui/.classpath @@ -11,7 +11,7 @@
- + diff --git a/com.avaloq.tools.ddk.check.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.ui/META-INF/MANIFEST.MF index c5bcced6b..dbc9ddfe5 100644 --- a/com.avaloq.tools.ddk.check.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.check.ui Bundle-SymbolicName: com.avaloq.tools.ddk.check.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.check.ui.internal.Activator Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext.builder, diff --git a/com.avaloq.tools.ddk.check.ui/pom.xml b/com.avaloq.tools.ddk.check.ui/pom.xml index 4946e2126..1cbbed8b7 100644 --- a/com.avaloq.tools.ddk.check.ui/pom.xml +++ b/com.avaloq.tools.ddk.check.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/.classpath b/com.avaloq.tools.ddk.checkcfg.core.test/.classpath index 2aa982295..fa768afab 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/.classpath +++ b/com.avaloq.tools.ddk.checkcfg.core.test/.classpath @@ -6,7 +6,7 @@ - +
diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/CheckCfgTestSuite.launch b/com.avaloq.tools.ddk.checkcfg.core.test/CheckCfgTestSuite.launch index 9c26ae0e3..b58b0e6ac 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/CheckCfgTestSuite.launch +++ b/com.avaloq.tools.ddk.checkcfg.core.test/CheckCfgTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.checkcfg.core.test/META-INF/MANIFEST.MF index 3108f987e..1c56f6fd2 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.checkcfg.core.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.checkcfg.core.test Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.checkcfg.core.test; singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.test.core, @@ -18,7 +18,7 @@ Require-Bundle: com.avaloq.tools.ddk.test.core, org.eclipse.core.runtime, org.eclipse.xtend.lib, org.eclipse.xtext.ui.testing, - org.junit, + org.junit.jupiter.api, org.eclipse.xtext.xbase.lib, org.eclipse.ui.workbench;resolution:=optional, org.objectweb.asm;resolution:=optional @@ -30,5 +30,5 @@ Import-Package: org.hamcrest.core, org.junit.runners.model;version="4.5.0" Export-Package: com.avaloq.tools.ddk.checkcfg.test, com.avaloq.tools.ddk.checkcfg.util -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Automatic-Module-Name: com.avaloq.tools.ddk.checkcfg.core.test diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml b/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml index 3234f6c2b..e03e10252 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/contentassist/CheckCfgContentAssistTest.xtend b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/contentassist/CheckCfgContentAssistTest.xtend index e9985f811..fb2d9f7aa 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/contentassist/CheckCfgContentAssistTest.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/contentassist/CheckCfgContentAssistTest.xtend @@ -16,7 +16,7 @@ import com.avaloq.tools.ddk.test.checkcfg.TestPropertySpecificationWithExpectedV import com.avaloq.tools.ddk.test.checkcfg.TestPropertySpecificationWithOutExpectedValues import com.avaloq.tools.ddk.xtext.test.contentassist.AbstractAcfContentAssistTest import com.google.common.collect.Lists -import org.junit.Test +import org.junit.jupiter.api.Test import static com.avaloq.tools.ddk.checkcfg.CheckCfgConstants.PROPERTY_EXECUTABLE_EXTENSION_ATTRIBUTE import static com.avaloq.tools.ddk.checkcfg.CheckCfgConstants.PROPERTY_EXTENSION_POINT diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/scoping/CheckCfgScopeProviderTest.xtend b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/scoping/CheckCfgScopeProviderTest.xtend index dd8e62f97..06e5dd3ab 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/scoping/CheckCfgScopeProviderTest.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/scoping/CheckCfgScopeProviderTest.xtend @@ -16,7 +16,7 @@ import com.avaloq.tools.ddk.checkcfg.checkcfg.CheckcfgPackage import com.avaloq.tools.ddk.checkcfg.util.CheckCfgTestUtil import com.avaloq.tools.ddk.xtext.test.scoping.AbstractScopingTest -import static org.junit.Assert.assertArrayEquals +import static org.junit.jupiter.api.Assertions.assertArrayEquals final class CheckCfgScopeProviderTest extends AbstractScopingTest { diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/syntax/CheckCfgSyntaxTest.xtend b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/syntax/CheckCfgSyntaxTest.xtend index 978c127b6..58c964040 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/syntax/CheckCfgSyntaxTest.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/syntax/CheckCfgSyntaxTest.xtend @@ -15,7 +15,7 @@ import com.avaloq.tools.ddk.checkcfg.util.CheckCfgTestUtil import com.avaloq.tools.ddk.xtext.test.validation.AbstractValidationTest import java.util.LinkedList import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil -import org.junit.Test +import org.junit.jupiter.api.Test class CheckCfgSyntaxTest extends AbstractValidationTest { diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgConfiguredParameterValidationsTest.xtend b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgConfiguredParameterValidationsTest.xtend index 015a28f1c..652212cd1 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgConfiguredParameterValidationsTest.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgConfiguredParameterValidationsTest.xtend @@ -16,7 +16,7 @@ import com.avaloq.tools.ddk.test.checkcfg.TestPropertySpecificationWithExpectedV import com.avaloq.tools.ddk.test.checkcfg.TestPropertySpecificationWithOutExpectedValues import com.avaloq.tools.ddk.xtext.test.validation.AbstractValidationTest import com.google.common.collect.Lists -import org.junit.Test +import org.junit.jupiter.api.Test import static com.avaloq.tools.ddk.checkcfg.CheckCfgConstants.PROPERTY_EXECUTABLE_EXTENSION_ATTRIBUTE import static com.avaloq.tools.ddk.checkcfg.CheckCfgConstants.PROPERTY_EXTENSION_POINT diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgTest.xtend b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgTest.xtend index b3e3b4ca3..e2091d231 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgTest.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgTest.xtend @@ -10,21 +10,20 @@ *******************************************************************************/ package com.avaloq.tools.ddk.checkcfg.validation +import com.avaloq.tools.ddk.checkcfg.CheckCfgUiInjectorProvider import com.avaloq.tools.ddk.checkcfg.checkcfg.CheckConfiguration import com.avaloq.tools.ddk.checkcfg.checkcfg.CheckcfgPackage import com.google.inject.Inject -import junit.framework.TestCase +import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.eclipse.xtext.testing.validation.ValidationTestHelper -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith -import org.eclipse.xtext.testing.InjectWith -import com.avaloq.tools.ddk.checkcfg.CheckCfgUiInjectorProvider @InjectWith(typeof(CheckCfgUiInjectorProvider)) @RunWith(XtextRunner) -class CheckCfgTest extends TestCase { +class CheckCfgTest { @Inject diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidationTest.java b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidationTest.java index 9098f1a1b..1ee103114 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidationTest.java +++ b/com.avaloq.tools.ddk.checkcfg.core.test/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidationTest.java @@ -14,7 +14,6 @@ import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.testing.util.ParseHelper; import org.eclipse.xtext.testing.validation.ValidationTestHelper; -import org.junit.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.checkcfg.CheckCfgUiInjectorProvider; @@ -23,15 +22,13 @@ import com.avaloq.tools.ddk.checkcfg.util.CheckCfgModelUtil; import com.google.inject.Inject; -import junit.framework.TestCase; - /** * Performs validations on Check Configuration models. */ @InjectWith(CheckCfgUiInjectorProvider.class) @RunWith(XtextRunner.class) -public class CheckCfgValidationTest extends TestCase { +public class CheckCfgValidationTest { @Inject private ValidationTestHelper helper; @@ -51,8 +48,8 @@ public class CheckCfgValidationTest extends TestCase { * @throws Exception * if a problem occurred parsing the test model */ - @Test - public void testDisabledCheckIsNotConfigured() throws Exception { // NOPMD + @org.junit.jupiter.api.Test + void testDisabledCheckIsNotConfigured() throws Exception { // NOPMD CheckConfiguration model = parser.parse(modelUtil.basicModelWithDisabledTest() + " (val = 0)"); helper.assertWarning(model, CheckcfgPackage.Literals.CONFIGURED_CHECK, IssueCodes.DISABLED_CHECK_NOT_CONFIGURED); } diff --git a/com.avaloq.tools.ddk.checkcfg.core/.classpath b/com.avaloq.tools.ddk.checkcfg.core/.classpath index 8ad1f7818..5a4d66ff3 100644 --- a/com.avaloq.tools.ddk.checkcfg.core/.classpath +++ b/com.avaloq.tools.ddk.checkcfg.core/.classpath @@ -11,7 +11,7 @@
- + diff --git a/com.avaloq.tools.ddk.checkcfg.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.checkcfg.core/META-INF/MANIFEST.MF index 62795fcc8..201b376cd 100644 --- a/com.avaloq.tools.ddk.checkcfg.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.checkcfg.core/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.checkcfg.core Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.checkcfg.core; singleton:=true Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.util, org.eclipse.emf.ecore, diff --git a/com.avaloq.tools.ddk.checkcfg.core/pom.xml b/com.avaloq.tools.ddk.checkcfg.core/pom.xml index 815c3306e..67c0544d9 100644 --- a/com.avaloq.tools.ddk.checkcfg.core/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.core/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.checkcfg.ide/.classpath b/com.avaloq.tools.ddk.checkcfg.ide/.classpath index 8ad1f7818..5a4d66ff3 100644 --- a/com.avaloq.tools.ddk.checkcfg.ide/.classpath +++ b/com.avaloq.tools.ddk.checkcfg.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.checkcfg.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.checkcfg.ide/META-INF/MANIFEST.MF index 81af5c384..b29d5277b 100644 --- a/com.avaloq.tools.ddk.checkcfg.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.checkcfg.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.checkcfg.ide Bundle-SymbolicName: com.avaloq.tools.ddk.checkcfg.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.checkcfg.core, com.avaloq.tools.ddk.check.runtime.core, diff --git a/com.avaloq.tools.ddk.checkcfg.ide/pom.xml b/com.avaloq.tools.ddk.checkcfg.ide/pom.xml index 2250649bd..f0d05183a 100644 --- a/com.avaloq.tools.ddk.checkcfg.ide/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.checkcfg.ui.test/.classpath b/com.avaloq.tools.ddk.checkcfg.ui.test/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui.test/.classpath +++ b/com.avaloq.tools.ddk.checkcfg.ui.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.checkcfg.ui.test/CheckCfgUiTestSuite.launch b/com.avaloq.tools.ddk.checkcfg.ui.test/CheckCfgUiTestSuite.launch index 50cfae473..509eda7de 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui.test/CheckCfgUiTestSuite.launch +++ b/com.avaloq.tools.ddk.checkcfg.ui.test/CheckCfgUiTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.checkcfg.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.checkcfg.ui.test/META-INF/MANIFEST.MF index 1f7a45ac3..c7ce684f9 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.checkcfg.ui.test/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.checkcfg.ui.test Bundle-SymbolicName: com.avaloq.tools.ddk.checkcfg.ui.test -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.checkcfg.ui.test Require-Bundle: org.junit Automatic-Module-Name: com.avaloq.tools.ddk.checkcfg.ui.test diff --git a/com.avaloq.tools.ddk.checkcfg.ui.test/pom.xml b/com.avaloq.tools.ddk.checkcfg.ui.test/pom.xml index 13aa45df5..c7ebd6f61 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.ui.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.checkcfg.ui/.classpath b/com.avaloq.tools.ddk.checkcfg.ui/.classpath index 1bd646a2d..19a2036d3 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui/.classpath +++ b/com.avaloq.tools.ddk.checkcfg.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.checkcfg.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.checkcfg.ui/META-INF/MANIFEST.MF index 211586f85..47a7824f1 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.checkcfg.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.checkcfg.ui Bundle-SymbolicName: com.avaloq.tools.ddk.checkcfg.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.checkcfg.ui.internal.Activator Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.checkcfg.core, diff --git a/com.avaloq.tools.ddk.checkcfg.ui/pom.xml b/com.avaloq.tools.ddk.checkcfg.ui/pom.xml index ae8670642..fae318d1b 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.feature/feature.xml b/com.avaloq.tools.ddk.feature/feature.xml index ae37bdc87..a43d971db 100644 --- a/com.avaloq.tools.ddk.feature/feature.xml +++ b/com.avaloq.tools.ddk.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/com.avaloq.tools.ddk.feature/pom.xml b/com.avaloq.tools.ddk.feature/pom.xml index 3bcc768f3..2414fa911 100644 --- a/com.avaloq.tools.ddk.feature/pom.xml +++ b/com.avaloq.tools.ddk.feature/pom.xml @@ -4,7 +4,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.runtime.feature/feature.xml b/com.avaloq.tools.ddk.runtime.feature/feature.xml index 0cb88032a..3c7cd1ee9 100644 --- a/com.avaloq.tools.ddk.runtime.feature/feature.xml +++ b/com.avaloq.tools.ddk.runtime.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/com.avaloq.tools.ddk.runtime.feature/pom.xml b/com.avaloq.tools.ddk.runtime.feature/pom.xml index aa1978536..151341d71 100644 --- a/com.avaloq.tools.ddk.runtime.feature/pom.xml +++ b/com.avaloq.tools.ddk.runtime.feature/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.runtime.source.feature/feature.xml b/com.avaloq.tools.ddk.runtime.source.feature/feature.xml index b317b01c2..ee053ad33 100644 --- a/com.avaloq.tools.ddk.runtime.source.feature/feature.xml +++ b/com.avaloq.tools.ddk.runtime.source.feature/feature.xml @@ -2,7 +2,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.sample.helloworld.ide/.classpath b/com.avaloq.tools.ddk.sample.helloworld.ide/.classpath index f227a417b..22caad00c 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ide/.classpath +++ b/com.avaloq.tools.ddk.sample.helloworld.ide/.classpath @@ -2,7 +2,7 @@ - + diff --git a/com.avaloq.tools.ddk.sample.helloworld.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.sample.helloworld.ide/META-INF/MANIFEST.MF index fcd5b5b40..937971d4a 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.sample.helloworld.ide/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: com.avaloq.tools.ddk.sample.helloworld.ide Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.sample.helloworld.ide Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.sample.helloworld.ide;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, @@ -19,7 +19,7 @@ Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, com.avaloq.tools.ddk.xtext.ide, com.avaloq.tools.ddk.xtext Import-Package: org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.sample.helloworld.ide, com.avaloq.tools.ddk.sample.helloworld.ide.contentassist.antlr, com.avaloq.tools.ddk.sample.helloworld.ide.contentassist.antlr.internal diff --git a/com.avaloq.tools.ddk.sample.helloworld.ide/pom.xml b/com.avaloq.tools.ddk.sample.helloworld.ide/pom.xml index dd019ae1e..f5effaeb5 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ide/pom.xml +++ b/com.avaloq.tools.ddk.sample.helloworld.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/.classpath b/com.avaloq.tools.ddk.sample.helloworld.ui.test/.classpath index 5169b9fe7..7b1ace8da 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/.classpath +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/.classpath @@ -4,7 +4,7 @@ - + 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 1e5e00b4b..7089080b9 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 @@ -3,12 +3,12 @@ Automatic-Module-Name: com.avaloq.tools.ddk.sample.helloworld.ui.test Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.sample.helloworld.ui.test Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.sample.helloworld.ui.test;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, com.avaloq.tools.ddk.sample.helloworld.ui, - org.junit, + org.junit.jupiter.api, org.eclipse.xtext.ui.testing, org.eclipse.xtext.testing, org.eclipse.xtext.xbase.testing, @@ -19,6 +19,6 @@ Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, com.avaloq.tools.ddk.check.runtime.ui, com.avaloq.tools.ddk.check.core.test, org.eclipse.xtext.xbase.ui.testing -Bundle-RequiredExecutionEnvironment: JavaSE-17 +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.sample.helloworld.ui.test/pom.xml b/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml index 46063426c..af0cdee60 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckConfigurationIsAppliedTest.xtend b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckConfigurationIsAppliedTest.xtend index 7a4f8e9b6..d0efb358c 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckConfigurationIsAppliedTest.xtend +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckConfigurationIsAppliedTest.xtend @@ -18,7 +18,7 @@ import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.validation.ValidationTestHelper import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import com.avaloq.tools.ddk.sample.helloworld.helloWorld.Model import com.avaloq.tools.ddk.sample.helloworld.ui.internal.HelloworldActivator diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckExecutionEnvironmentProjectTest.xtend b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckExecutionEnvironmentProjectTest.xtend index 6ee7691b4..bb49723ff 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckExecutionEnvironmentProjectTest.xtend +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/check/CheckExecutionEnvironmentProjectTest.xtend @@ -16,7 +16,7 @@ import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.eclipse.xtext.testing.validation.ValidationTestHelper -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import com.avaloq.tools.ddk.sample.helloworld.ui.internal.HelloworldActivator import com.avaloq.tools.ddk.sample.helloworld.helloWorld.Model diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/label/IssueLabelTest.xtend b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/label/IssueLabelTest.xtend index 52f52a928..2d1fdaf53 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/label/IssueLabelTest.xtend +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/src/com/avaloq/tools/ddk/sample/helloworld/label/IssueLabelTest.xtend @@ -12,10 +12,10 @@ package com.avaloq.tools.ddk.sample.helloworld.label import com.google.inject.AbstractModule import com.google.inject.Guice -import org.junit.Test +import org.junit.jupiter.api.Test -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertNotNull +import static org.junit.jupiter.api.Assertions.assertEquals +import static org.junit.jupiter.api.Assertions.assertNotNull import com.avaloq.tools.ddk.sample.helloworld.validation.LibraryChecksIssueCodes import com.avaloq.tools.ddk.check.runtime.label.ICheckRuleLabelProvider diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui/.classpath b/com.avaloq.tools.ddk.sample.helloworld.ui/.classpath index f227a417b..22caad00c 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui/.classpath +++ b/com.avaloq.tools.ddk.sample.helloworld.ui/.classpath @@ -2,7 +2,7 @@ - + diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.sample.helloworld.ui/META-INF/MANIFEST.MF index f47e1c272..58be42695 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.sample.helloworld.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: com.avaloq.tools.ddk.sample.helloworld.ui Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.sample.helloworld.ui Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.sample.helloworld.ui;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, @@ -23,7 +23,7 @@ Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, com.avaloq.tools.ddk.sample.helloworld.ide, com.avaloq.tools.ddk.xtext.ide Import-Package: org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.sample.helloworld.ui.quickfix, com.avaloq.tools.ddk.sample.helloworld.ui.contentassist, com.avaloq.tools.ddk.sample.helloworld.ui.internal diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui/pom.xml b/com.avaloq.tools.ddk.sample.helloworld.ui/pom.xml index da95f4fc7..d26771570 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui/pom.xml +++ b/com.avaloq.tools.ddk.sample.helloworld.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.sample.helloworld/.classpath b/com.avaloq.tools.ddk.sample.helloworld/.classpath index b8e5a71ae..46818254c 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/.classpath +++ b/com.avaloq.tools.ddk.sample.helloworld/.classpath @@ -3,7 +3,7 @@ - +
diff --git a/com.avaloq.tools.ddk.sample.helloworld/.launch/Launch Runtime Eclipse.launch b/com.avaloq.tools.ddk.sample.helloworld/.launch/Launch Runtime Eclipse.launch index 1c2989b10..1a56ffc86 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/.launch/Launch Runtime Eclipse.launch +++ b/com.avaloq.tools.ddk.sample.helloworld/.launch/Launch Runtime Eclipse.launch @@ -18,7 +18,7 @@ - + diff --git a/com.avaloq.tools.ddk.sample.helloworld/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.sample.helloworld/META-INF/MANIFEST.MF index 4d1e9da1d..746fac35a 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.sample.helloworld/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: com.avaloq.tools.ddk.sample.helloworld Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.sample.helloworld Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.sample.helloworld;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, @@ -24,7 +24,7 @@ Require-Bundle: org.eclipse.xtext, com.avaloq.tools.ddk.check.core, com.avaloq.tools.ddk.xtext.generator;resolution:=optional, org.eclipse.xtext.xtext.generator;resolution:=optional -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.sample.helloworld.helloWorld, com.avaloq.tools.ddk.sample.helloworld.serializer, com.avaloq.tools.ddk.sample.helloworld.helloWorld.util, diff --git a/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/ExecutionEnvironmentCheckCatalog.java b/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/ExecutionEnvironmentCheckCatalog.java index c4f89baed..fd751016a 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/ExecutionEnvironmentCheckCatalog.java +++ b/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/ExecutionEnvironmentCheckCatalog.java @@ -17,7 +17,7 @@ public class ExecutionEnvironmentCheckCatalog extends AbstractIssue { @Inject private ICheckConfigurationStoreService checkConfigurationStoreService; - private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builder() + private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builderWithExpectedSize(2) .put(ExecutionEnvironmentIssueCodes.FRANZNAME, "Greeting name length") .put(ExecutionEnvironmentIssueCodes.NAMELENGTH, "Greeting name length") .build() diff --git a/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/LibraryChecksCheckCatalog.java b/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/LibraryChecksCheckCatalog.java index 0b40b5358..83aca3cb1 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/LibraryChecksCheckCatalog.java +++ b/com.avaloq.tools.ddk.sample.helloworld/dsl-gen/com/avaloq/tools/ddk/sample/helloworld/validation/LibraryChecksCheckCatalog.java @@ -18,7 +18,7 @@ public class LibraryChecksCheckCatalog extends AbstractIssue { @Inject private ICheckConfigurationStoreService checkConfigurationStoreService; - private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builder() + private static final ImmutableMap issueCodeToLabelMap = ImmutableMap.builderWithExpectedSize(4) .put(LibraryChecksIssueCodes.CACHE_DOESNT_WORK, "Cache doesn't work") .put(LibraryChecksIssueCodes.CACHE_INJECTION_FAILED, "Cache injection failed") .put(LibraryChecksIssueCodes.CHECK_CATALOG_IS_ACTIVE, "Check catalog is active") diff --git a/com.avaloq.tools.ddk.sample.helloworld/pom.xml b/com.avaloq.tools.ddk.sample.helloworld/pom.xml index 9bd7f2a6f..35cd7515b 100644 --- a/com.avaloq.tools.ddk.sample.helloworld/pom.xml +++ b/com.avaloq.tools.ddk.sample.helloworld/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.source.feature/feature.xml b/com.avaloq.tools.ddk.source.feature/feature.xml index a036f807f..11916c830 100644 --- a/com.avaloq.tools.ddk.source.feature/feature.xml +++ b/com.avaloq.tools.ddk.source.feature/feature.xml @@ -2,7 +2,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.test.core/.classpath b/com.avaloq.tools.ddk.test.core/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.test.core/.classpath +++ b/com.avaloq.tools.ddk.test.core/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF index d829313a4..e5d2f87b9 100644 --- a/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.test.core Bundle-SymbolicName: com.avaloq.tools.ddk.test.core;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.hamcrest.library, - org.junit, + org.junit.jupiter.api, org.mockito, com.google.guava, org.apache.commons.lang, diff --git a/com.avaloq.tools.ddk.test.core/pom.xml b/com.avaloq.tools.ddk.test.core/pom.xml index cab8f6879..ecd0a6235 100644 --- a/com.avaloq.tools.ddk.test.core/pom.xml +++ b/com.avaloq.tools.ddk.test.core/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/AbstractSystemTest.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/AbstractSystemTest.java index cf2ab9a09..78ee5283e 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/AbstractSystemTest.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/AbstractSystemTest.java @@ -15,8 +15,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.junit.Rule; import org.junit.internal.AssumptionViolatedException; import org.junit.rules.TestWatcher; @@ -127,7 +127,7 @@ public void finished(final Description description) { * Setup of the system test. * Implementations need to specify the setup steps in this method and also provide the @Before annotation. */ - @Before + @BeforeEach public void setUp() { AbstractTestStep.registerTestStepListener(this); } @@ -209,7 +209,7 @@ protected final void executeSystemTestPlan() { * Note: Undoes all test and setup steps in the correct order, if the test is not marked as a System Test. *

*/ - @After + @AfterEach public void tearDown() { try { AbstractTestStep.setCheckPreconditions(true); diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/BugTestAwareRule.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/BugTestAwareRule.java index fc61f2b06..469b1efb2 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/BugTestAwareRule.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/BugTestAwareRule.java @@ -37,7 +37,7 @@ * @org.junit.Test * @com.avaloq.tools.ddk.test.core.BugTest(value = "BUG-42", unresolved = true) * public void testMethod() { - * org.junit.Assert.fail(); + * org.junit.Assertions.fail(); * } * } * diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java index b82ee7384..9eadac7e9 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java @@ -13,9 +13,9 @@ import java.util.List; import java.util.ListIterator; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; -import org.eclipse.core.runtime.Assert; +import org.apache.logging.log4j.Logger; +import org.junit.jupiter.api.Assertions; import com.google.common.collect.Lists; @@ -130,9 +130,9 @@ public void undo() { * the {@link Throwable} of the problem(s) encountered, must not be {@code null} */ private void addUndoProblem(final MultipleTestProblems multipleTestProblems, final AbstractStep step, final Throwable throwable) { - Assert.isNotNull(multipleTestProblems, "multipleTestProblems"); - Assert.isNotNull(step, ARGUMENT_STEP); - Assert.isNotNull(throwable, ARGUMENT_THROWABLE); + Assertions.isNotNull(multipleTestProblems, "multipleTestProblems"); + Assertions.isNotNull(step, ARGUMENT_STEP); + Assertions.isNotNull(throwable, ARGUMENT_THROWABLE); if (throwable instanceof MultipleTestProblems) { MultipleTestProblems caughtMultipleTestProblems = (MultipleTestProblems) throwable; for (Throwable problem : caughtMultipleTestProblems.getProblems()) { @@ -157,8 +157,8 @@ private void addUndoProblem(final MultipleTestProblems multipleTestProblems, fin * the problem occurred, never {@code null} */ private void logError(final AbstractStep step, final Throwable throwable) { - Assert.isNotNull(step, ARGUMENT_STEP); - Assert.isNotNull(throwable, ARGUMENT_THROWABLE); + Assertions.isNotNull(step, ARGUMENT_STEP); + Assertions.isNotNull(throwable, ARGUMENT_THROWABLE); logger.error("Error in " + step.getName() + ": " + throwable.getLocalizedMessage()); } @@ -172,7 +172,7 @@ private void logError(final AbstractStep step, final Throwable throwable) { * @return the newly added {@link AbstractStep}, never {@code null} */ public T addStep(final T step) { - Assert.isNotNull(step, ARGUMENT_STEP); + Assertions.isNotNull(step, ARGUMENT_STEP); plannedSteps.add(step); return step; } @@ -184,7 +184,7 @@ public T addStep(final T step) { * the steps to add, must not be {@code null} */ public void addSteps(final List steps) { - Assert.isNotNull(steps, ARGUMENT_STEPS); + Assertions.isNotNull(steps, ARGUMENT_STEPS); for (final AbstractStep step : steps) { if (step != null) { addStep(step); diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/IssueAwareRule.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/IssueAwareRule.java index 40413f0ce..cde0592fc 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/IssueAwareRule.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/IssueAwareRule.java @@ -37,7 +37,7 @@ * @org.junit.Test * @com.avaloq.tools.ddk.test.core.Issue(value = "ISSUE-42", fixed = false) * public void testMethod() { - * org.junit.Assert.fail(); + * org.junit.Assertions.fail(); * } * } * diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/StepResult.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/StepResult.java index 6d3bb54a8..4d60a13b5 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/StepResult.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/StepResult.java @@ -51,7 +51,7 @@ public T getValue() { void setValue(final T value) { // currently we set the result multiple time until the postconditions succeed. Hence we cannot enforce this anymore. // XXX : think about refactoring so that we can check the following assertion again, or decide to remove it for good. - // Assert.assertFalse("Step result value must not have been set yet.", valueSet); + // Assertions.assertFalse("Step result value must not have been set yet.", valueSet); this.value = value; valueSet = true; } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java index 573073238..a7d6d0a01 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.test.core; -import org.eclipse.core.runtime.Assert; +import org.junit.jupiter.api.Assertions; /** @@ -34,8 +34,8 @@ public class TestEntityAction { * the entity action, must not be {@code null} */ public TestEntityAction(final ITestEntity testEntity, final TestEntityOperation entityAction) { - Assert.isNotNull(testEntity, TEST_ENTITY_ARGUMENT); - Assert.isNotNull(entityAction, ENTITY_ACTION_ARGUMENT); + Assertions.isNotNull(testEntity, TEST_ENTITY_ARGUMENT); + Assertions.isNotNull(entityAction, ENTITY_ACTION_ARGUMENT); if (entityAction.equals(TestEntityOperation.DISPOSE)) { testEntity.dispose(); } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java index 0d1427d31..2028945c0 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java @@ -18,7 +18,7 @@ import java.util.ListIterator; import java.util.Set; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; @@ -73,7 +73,7 @@ public static TestPlan create() { * @return the newly added {@link AbstractStep}, never {@code null} */ public T addSetupStep(final T setupStep) { - Assert.assertTrue("Must not add a setup step after adding a test step.", getCompoundTestStep().getSteps().isEmpty()); + Assertions.assertTrue("Must not add a setup step after adding a test step.", getCompoundTestStep().getSteps().isEmpty()); getCompoundSetupStep().addStep(setupStep); return setupStep; } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/ClassRunner.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/ClassRunner.java index 60074e5ac..b8acd3223 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/ClassRunner.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/ClassRunner.java @@ -19,9 +19,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.internal.AssumptionViolatedException; import org.junit.internal.runners.model.EachTestNotifier; import org.junit.internal.runners.statements.RunAfters; @@ -140,7 +140,7 @@ private void ensureInitialized() { expectedMethods = ImmutableList.copyOf(Iterables.filter(testMethods, new Predicate() { @Override public boolean apply(final FrameworkMethod input) { - return input.getAnnotation(Ignore.class) == null; + return input.getAnnotation(Disabled.class) == null; } })); currentMethodIndex = 0; @@ -184,9 +184,9 @@ public void filter(final Filter filter) throws NoTestsRemainException { @Override protected void runChild(final FrameworkMethod method, final RunNotifier notifier) { ensureInitialized(); - final boolean ignored = method.getAnnotation(Ignore.class) != null; + final boolean ignored = method.getAnnotation(Disabled.class) != null; if (!ignored) { - Assert.assertEquals("Method " + method.getName() + " not equal", expectedMethods.get(currentMethodIndex++), method); //$NON-NLS-1$//$NON-NLS-2$ + Assertions.assertEquals("Method " + method.getName() + " not equal", expectedMethods.get(currentMethodIndex++), method); //$NON-NLS-1$//$NON-NLS-2$ } if (ignored || testRuns == 1 && testRetries == 0 && method.getAnnotation(Retry.class) == null) { super.runChild(method, notifier); 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 a8eb2d487..6a880e7ad 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; @@ -172,7 +172,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 aa8988e36..f5c9cff81 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/CoreUtilTools.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/CoreUtilTools.java index 1635b29ad..bb3928d58 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/CoreUtilTools.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/CoreUtilTools.java @@ -15,7 +15,7 @@ import java.util.Locale; import org.apache.commons.lang.RandomStringUtils; -import org.eclipse.core.runtime.Assert; +import org.junit.jupiter.api.Assertions; /** @@ -77,7 +77,7 @@ public static String randomAlphanumericString(final int count) { } String string = stringBuilder.toString(); - Assert.isNotNull(string, "string"); //$NON-NLS-1$ + Assertions.isNotNull(string, "string"); //$NON-NLS-1$ return string.toUpperCase(Locale.ENGLISH); } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobChangeListener.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobChangeListener.java index 306baee5b..bc957aaf8 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobChangeListener.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/util/JobChangeListener.java @@ -14,11 +14,11 @@ import java.util.Map; import java.util.Set; -import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.junit.jupiter.api.Assertions; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -124,7 +124,7 @@ public synchronized void scheduled(final IJobChangeEvent event) { * @return {@code true} if such a job was found, {@code false} otherwise */ public synchronized boolean hasJob(final String name) { - Assert.isNotNull(name, "name"); + Assertions.isNotNull(name, "name"); if (jobNames.contains(name)) { return true; } 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 9d86755c8..0e3d705ed 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; @@ -213,7 +213,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("Wrong number of jobs were scheduled", expected, newJobs.size()); } /** @@ -226,13 +226,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("No matching new jobs were scheduled: " + finder, expectedJobs.isEmpty()); 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) { @@ -260,7 +260,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 a2ced2e21..e5fde6e4c 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); + Assertions.assertFalse("Progress monitor did not get done signal", remainingWaitTime <= 0); try { this.wait(remainingWaitTime); } catch (InterruptedException e) /* CHECKSTYLE:OFF */ { diff --git a/com.avaloq.tools.ddk.test.ui.test/.classpath b/com.avaloq.tools.ddk.test.ui.test/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.test.ui.test/.classpath +++ b/com.avaloq.tools.ddk.test.ui.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.test.ui.test/AllTests.launch b/com.avaloq.tools.ddk.test.ui.test/AllTests.launch index efbffb162..56067c7ec 100644 --- a/com.avaloq.tools.ddk.test.ui.test/AllTests.launch +++ b/com.avaloq.tools.ddk.test.ui.test/AllTests.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.test.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.test.ui.test/META-INF/MANIFEST.MF index f522ea363..a704d6d18 100644 --- a/com.avaloq.tools.ddk.test.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.ui.test/META-INF/MANIFEST.MF @@ -2,11 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.test.ui.test Bundle-SymbolicName: com.avaloq.tools.ddk.test.ui.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-ActivationPolicy: lazy Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.junit, +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Require-Bundle: org.junit.jupiter.api, org.eclipse.swtbot.eclipse.finder, org.eclipse.swt, com.avaloq.tools.ddk.test.core, diff --git a/com.avaloq.tools.ddk.test.ui.test/pom.xml b/com.avaloq.tools.ddk.test.ui.test/pom.xml index f3ea15ea9..4cd579d36 100644 --- a/com.avaloq.tools.ddk.test.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.test.ui.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/logging/ErrorLogListenerTest.java b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/logging/ErrorLogListenerTest.java index a928c2178..8b0ff76b1 100644 --- a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/logging/ErrorLogListenerTest.java +++ b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/logging/ErrorLogListenerTest.java @@ -10,15 +10,15 @@ *******************************************************************************/ package com.avaloq.tools.ddk.test.ui.test.logging; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.Job; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.test.core.util.ErrorLogListener; @@ -32,7 +32,7 @@ public class ErrorLogListenerTest { /** * Sets up the {@link ErrorLogListener} under test. */ - @Before + @BeforeEach public void setUp() { errorLogListener = new ErrorLogListener(); errorLogListener.register(); @@ -41,7 +41,7 @@ public void setUp() { /** * Tears down the {@link ErrorLogListener} under test. */ - @After + @AfterEach public void tearDown() { errorLogListener.unregister(); } @@ -53,8 +53,8 @@ public void tearDown() { * the exception that is thrown if the test job was interrupted */ @SuppressWarnings("unlikely-arg-type") - @Test - public void testIgnoringExceptionLocations() throws InterruptedException { + @org.junit.jupiter.api.Test + void testIgnoringExceptionLocations() throws InterruptedException { assertFalse("NullPointerException must not have been logged.", errorLogListener.isExceptionLogged(NullPointerException.class)); errorLogListener.ignoreException(NullPointerException.class, "com.avaloq.tools.ddk.test.core.util.ErrorLogListenerTest"); diff --git a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/DeChKeyboardLayoutTest.java b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/DeChKeyboardLayoutTest.java index fd895d38e..9cd7e8d82 100644 --- a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/DeChKeyboardLayoutTest.java +++ b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/DeChKeyboardLayoutTest.java @@ -10,11 +10,11 @@ *******************************************************************************/ package com.avaloq.tools.ddk.test.ui.test.swtbot; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor; import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.test.ui.swtbot.SwtWorkbenchBot; @@ -29,7 +29,7 @@ public class DeChKeyboardLayoutTest { * Tests com.avaloq.test.swtbot.DE_CH. */ @Test - public void testDeChKeyboardLayout() { + void testDeChKeyboardLayout() { SWTBotPreferences.KEYBOARD_LAYOUT = "com.avaloq.test.swtbot.DE_CH"; SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.MockKeyboardStrategy"; SwtWorkbenchBot bot = new SwtWorkbenchBot(); diff --git a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java index 0d51f80db..1e94821ee 100644 --- a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java +++ b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java @@ -10,12 +10,12 @@ *******************************************************************************/ package com.avaloq.tools.ddk.test.ui.test.swtbot; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot; import org.junit.Rule; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.test.core.Issue; import com.avaloq.tools.ddk.test.core.IssueAwareRule; @@ -57,8 +57,8 @@ public String getText() { /** * Test if the method {@link com.avaloq.tools.ddk.test.ui.swtbot.SwtBotRadio#click()} works correctly. */ - @Test - public void testSwtRadioButtonClick() { + @org.junit.jupiter.api.Test + void testSwtRadioButtonClick() { SwtWorkbenchBot bot = new SwtWorkbenchBot(); bot.resetWorkbench(); testRadioButtonClick(bot); diff --git a/com.avaloq.tools.ddk.test.ui/.classpath b/com.avaloq.tools.ddk.test.ui/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.test.ui/.classpath +++ b/com.avaloq.tools.ddk.test.ui/.classpath @@ -1,6 +1,6 @@ - + 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 7ec63e960..310f61346 100644 --- a/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.test.ui Bundle-SymbolicName: com.avaloq.tools.ddk.test.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.test.ui.Activator Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.test.core, @@ -17,7 +17,7 @@ Require-Bundle: com.avaloq.tools.ddk.test.core, org.eclipse.swtbot.swt.finder, org.eclipse.ui;visibility:=reexport, org.hamcrest.library, - org.junit, + org.junit.jupiter.api, org.mockito, com.google.guava, org.apache.commons.lang, diff --git a/com.avaloq.tools.ddk.test.ui/pom.xml b/com.avaloq.tools.ddk.test.ui/pom.xml index 495b09608..04ab20ca8 100644 --- a/com.avaloq.tools.ddk.test.ui/pom.xml +++ b/com.avaloq.tools.ddk.test.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent 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 17375e054..d256ee851 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; @@ -19,7 +19,6 @@ import java.util.Arrays; import java.util.List; -import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.AssertionFailedException; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.osgi.util.NLS; @@ -48,6 +47,7 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.test.core.util.Reflect; import com.avaloq.tools.ddk.test.ui.swtbot.condition.WaitForTable; @@ -141,7 +141,7 @@ public static WorkbenchFocusPolicy getWorkbenchFocusPolicy() { * the {@link SwtWorkbenchBot} for which to check the focus, must not be {@code null} */ public static void enforceWorkbenchFocusPolicy(final SwtWorkbenchBot bot) { - Assert.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(bot, ARGUMENT_BOT); if (bot.getFocusedWidget() == null) { if (WorkbenchFocusPolicy.WAIT == getWorkbenchFocusPolicy()) { bot.waitUntilFocused(); @@ -167,7 +167,7 @@ public void run() { * to work with, must not be {@code null} */ public static void initializeWorkbench(final SwtWorkbenchBot bot) { - Assert.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(bot, ARGUMENT_BOT); // Move mouse outside client area (to prevent problems with context menus) PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @Override @@ -196,7 +196,7 @@ public void run() { * if {@code true}, append the name of the calling method to the prefix */ public static void captureScreenshot(final SWTBot bot, final String prefix, final boolean useCaller) { - Assert.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(bot, ARGUMENT_BOT); if (prefix == null && !useCaller) { throw new IllegalArgumentException(); } @@ -221,8 +221,8 @@ public static void captureScreenshot(final SWTBot bot, final String prefix, fina * @return {@code true} if a window was found, {@code false} otherwise */ public static boolean checkOpenWindow(final SWTWorkbenchBot bot, final String windowName) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(windowName, "windowName"); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(windowName, "windowName"); try { final SWTBotShell shell = bot.shell(windowName); shell.isActive(); @@ -241,8 +241,8 @@ public static boolean checkOpenWindow(final SWTWorkbenchBot bot, final String wi * the new perspective to open, must not be {@code null} */ public static void switchPerspective(final SWTWorkbenchBot bot, final String perspective) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(perspective, "perspective"); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(perspective, "perspective"); // Change the perspective via the Open Perspective dialog bot.menu("Window").menu("Open Perspective").menu("Other...").click(); final SWTBotShell shell = bot.shell("Open Perspective"); @@ -291,8 +291,8 @@ public void run() { * to look for items in, must not be {@code null} */ public static void waitForTreeItem(final SWTWorkbenchBot bot, final SWTBotTree tree) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(tree, ARGUMENT_TREE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(tree, ARGUMENT_TREE); bot.waitUntilWidgetAppears(new WaitForTree(tree.widget)); } @@ -305,8 +305,8 @@ public static void waitForTreeItem(final SWTWorkbenchBot bot, final SWTBotTree t * the {@link SWTBotTable}, must not be {@code null} */ public static void waitForTableItem(final SWTWorkbenchBot bot, final SWTBotTable table) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(table, ARGUMENT_TABLE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(table, ARGUMENT_TABLE); bot.waitUntilWidgetAppears(new WaitForTable(table.widget)); } @@ -320,8 +320,8 @@ public static void waitForTableItem(final SWTWorkbenchBot bot, final SWTBotTable * @return list of tree items, never {@code null} */ public static List treeItems(final SWTWorkbenchBot bot, final SWTBotTree tree) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(tree, ARGUMENT_TREE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(tree, ARGUMENT_TREE); waitForTreeItem(bot, tree); return new ArrayList(Arrays.asList(tree.getAllItems())); } @@ -336,8 +336,8 @@ public static List treeItems(final SWTWorkbenchBot bot, final SW * @return list of table items, never {@code null} */ public static List tableItems(final SWTWorkbenchBot bot, final SWTBotTable table) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(table, ARGUMENT_TABLE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(table, ARGUMENT_TABLE); waitForTableItem(bot, table); List items = null; for (int i = 0; i < table.rowCount(); i++) { @@ -354,7 +354,7 @@ public static List tableItems(final SWTWorkbenchBot bot, final * @return clipboard text content, or {@code null} if no text data is available */ public static String getClipboardContent(final SWTWorkbenchBot bot) { - Assert.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(bot, ARGUMENT_BOT); return UIThreadRunnable.syncExec(new Result() { @Override public String run() { @@ -374,8 +374,8 @@ public String run() { * @return {@code true} if expanded, {@code false} otherwise */ public static boolean waitForItem(final SWTWorkbenchBot bot, final SWTBotTreeItem item) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(item, ARGUMENT_ITEM); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(item, ARGUMENT_ITEM); item.select(); safeBlockingExpand(bot, item); if (item.getItems().length == 0) { @@ -394,8 +394,8 @@ public static boolean waitForItem(final SWTWorkbenchBot bot, final SWTBotTreeIte * the name of the view, must not be {@code null} */ public static void openView(final SWTWorkbenchBot bot, final String view) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(view, ARGUMENT_VIEW); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(view, ARGUMENT_VIEW); openView(bot, "Avaloq", view); } @@ -406,7 +406,7 @@ public static void openView(final SWTWorkbenchBot bot, final String view) { * the view id, must not be {@code null} */ public static void openView(final String id) { - Assert.isNotNull(id, "id"); + Assertions.isNotNull(id, "id"); PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @Override @@ -431,9 +431,9 @@ public void run() { * the name of the view, must not be {@code null} */ public static void openView(final SWTWorkbenchBot bot, final String category, final String view) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(category, "category"); - Assert.isNotNull(view, ARGUMENT_VIEW); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(category, "category"); + Assertions.isNotNull(view, ARGUMENT_VIEW); bot.menu("Window").menu("Show View").menu("Other...").click(); bot.shell("Show View").activate(); final SWTBotTree tree = bot.tree(); @@ -469,9 +469,9 @@ public static void openView(final SWTWorkbenchBot bot, final String category, fi * @return the {@link SWTBotTreeItem}, never {@code null} */ public static SWTBotTreeItem findTreeItem(final SWTWorkbenchBot bot, final SWTBotTree tree, final String item) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(tree, "tree"); - Assert.isNotNull(item, ARGUMENT_ITEM); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(tree, "tree"); + Assertions.isNotNull(item, ARGUMENT_ITEM); int itemCount = 0; boolean itemFound = false; SWTBotTreeItem botTreeItem = null; @@ -508,8 +508,8 @@ public static SWTBotTreeItem findTreeItem(final SWTWorkbenchBot bot, final SWTBo * the name of the desired page (e.g. 'Database'), must not be {@code null} */ public static void openAvaloqPreferencesSection(final SWTWorkbenchBot bot, final String section) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(section, "section"); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(section, "section"); bot.menu("Window").menu("Preferences").click(); final SWTBotShell shell = bot.shell("Preferences"); shell.activate(); @@ -531,8 +531,8 @@ public static void openAvaloqPreferencesSection(final SWTWorkbenchBot bot, final * @return the full name of the item as string, never {@code null} */ public static String getCcomboItemText(final SWTBotCCombo ccombo, final String prefix) { - Assert.isNotNull(ccombo, "ccombo"); - Assert.isNotNull(prefix, "prefix"); + Assertions.isNotNull(ccombo, "ccombo"); + Assertions.isNotNull(prefix, "prefix"); for (String ccomboItem : ccombo.items()) { if (ccomboItem.startsWith(prefix)) { return ccomboItem; @@ -550,8 +550,8 @@ public static String getCcomboItemText(final SWTBotCCombo ccombo, final String p * node to wait for, must not be {@code null} */ public static void safeBlockingCollapse(final SWTWorkbenchBot bot, final SWTBotTreeItem node) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(node, ARGUMENT_NODE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(node, ARGUMENT_NODE); if (node.isExpanded()) { node.collapse(); try { @@ -584,8 +584,8 @@ public String getFailureMessage() { * node to wait for, must not be {@code null} */ public static void safeBlockingExpand(final SWTWorkbenchBot bot, final SWTBotTreeItem node) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(node, ARGUMENT_NODE); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(node, ARGUMENT_NODE); if (!node.isExpanded()) { node.expand(); try { @@ -621,8 +621,8 @@ public String getFailureMessage() { * @return the last tree item that was expanded, or {@code null} if no item was found */ public static SWTBotTreeItem expandNode(final SWTBotTree bot, final String... nodes) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(nodes, ARGUMENT_NODES); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(nodes, ARGUMENT_NODES); assertArgumentIsNotEmpty(nodes, ARGUMENT_NODES); new SWTBot().waitUntil(widgetIsEnabled(bot)); SWTBotTreeItem item = bot.getTreeItem(nodes[0]); @@ -650,8 +650,8 @@ public static SWTBotTreeItem expandNode(final SWTBotTree bot, final String... no * @return the last tree node that was expanded, never {@code null} */ public static SWTBotTreeItem expandNode(final SWTBotTreeItem bot, final String... nodes) { - Assert.isNotNull(bot, ARGUMENT_BOT); - Assert.isNotNull(nodes, ARGUMENT_NODES); + Assertions.isNotNull(bot, ARGUMENT_BOT); + Assertions.isNotNull(nodes, ARGUMENT_NODES); assertArgumentIsNotEmpty(nodes, ARGUMENT_NODES); SWTBotTreeItem item = bot; for (String node : nodes) { @@ -677,7 +677,7 @@ public static SWTBotTreeItem expandNode(final SWTBotTreeItem bot, final String.. * one array element is null. */ private static void assertArgumentIsNotEmpty(final Object[] array, final String name) { - Assert.isNotNull(array, name); + Assertions.isNotNull(array, name); if (array.length == 0) { throw new IllegalArgumentException("Contract for argument '" + name + "' failed: Array parameter must not be empty."); //$NON-NLS-1$ } else { 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 058fc8374..83a734254 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; diff --git a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotToolbarButtonUtil.java b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotToolbarButtonUtil.java index 9ae4c9134..79e64e547 100644 --- a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotToolbarButtonUtil.java +++ b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotToolbarButtonUtil.java @@ -10,10 +10,10 @@ *******************************************************************************/ package com.avaloq.tools.ddk.test.ui.swtbot.util; -import org.eclipse.core.runtime.Assert; import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable; import org.eclipse.swtbot.swt.finder.results.BoolResult; import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton; +import org.junit.jupiter.api.Assertions; /** @@ -29,7 +29,7 @@ public final class SwtBotToolbarButtonUtil { * @return {@code true} if the toolbar button is selected, {@code false} otherwise */ public static boolean isSelected(final SWTBotToolbarButton toolbarButton) { - Assert.isNotNull(toolbarButton, "toolbarButton"); + Assertions.isNotNull(toolbarButton, "toolbarButton"); return UIThreadRunnable.syncExec(toolbarButton.display, new BoolResult() { @Override public Boolean run() { 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 e0e11cdf2..8a4483419 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; @@ -47,7 +47,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("folder was not found", selectItem(botTree, folderName)); }); } diff --git a/com.avaloq.tools.ddk.typesystem.test/.classpath b/com.avaloq.tools.ddk.typesystem.test/.classpath index b6ada0807..0aa1aa099 100644 --- a/com.avaloq.tools.ddk.typesystem.test/.classpath +++ b/com.avaloq.tools.ddk.typesystem.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.typesystem.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.typesystem.test/META-INF/MANIFEST.MF index 030f9b223..86e5949a8 100644 --- a/com.avaloq.tools.ddk.typesystem.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.typesystem.test/META-INF/MANIFEST.MF @@ -2,13 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.typesystem.test Bundle-SymbolicName: com.avaloq.tools.ddk.typesystem.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Fragment-Host: com.avaloq.tools.ddk.typesystem Require-Bundle: com.google.inject, com.google.guava, - org.junit + junit-jupiter-api Export-Package: com.avaloq.tools.ddk.typesystem.test Automatic-Module-Name: com.avaloq.tools.ddk.typesystem.test diff --git a/com.avaloq.tools.ddk.typesystem.test/TypeSystemTestSuite.launch b/com.avaloq.tools.ddk.typesystem.test/TypeSystemTestSuite.launch index 746652ea9..12b7406b6 100644 --- a/com.avaloq.tools.ddk.typesystem.test/TypeSystemTestSuite.launch +++ b/com.avaloq.tools.ddk.typesystem.test/TypeSystemTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.typesystem.test/pom.xml b/com.avaloq.tools.ddk.typesystem.test/pom.xml index 06ee2906a..2126d41a0 100644 --- a/com.avaloq.tools.ddk.typesystem.test/pom.xml +++ b/com.avaloq.tools.ddk.typesystem.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProviderTest.java b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProviderTest.java index 83bc6e7f4..7a33deee2 100644 --- a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProviderTest.java +++ b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProviderTest.java @@ -10,9 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.typesystem; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Arrays; @@ -23,8 +23,8 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcoreFactory; import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.typesystem.typemodel.IExpression; import com.avaloq.tools.ddk.typesystem.typemodel.INamedElement; @@ -70,7 +70,7 @@ private EClass createEClass(final String name, final EClass... superTypes) { return clazz; } - @Before + @BeforeEach public void init() { EcoreFactory modelFactory = EcoreFactory.eINSTANCE; testModelPackage = modelFactory.createEPackage(); @@ -109,13 +109,13 @@ private void testPlainProvider(final ITypeProvider plainProvider) { } @Test - public void testTypeProviderPlain() { + void testTypeProviderPlain() { ITypeProvider provider = new PlainTypeProvider(); testPlainProvider(provider); } @Test - public void testTypeProviderCyclicDefault() { + void testTypeProviderCyclicDefault() { ITypeProvider provider = new CyclicDefaultTypeProvider(); assertNull("cylic type for expression1 not null", provider.getType(expression1)); assertNull("cylic type for expression2 not null", provider.getType(expression2)); @@ -125,8 +125,8 @@ public void testTypeProviderCyclicDefault() { assertNull("cyclic type for namedElement2 not null", provider.getTypeForNamedElement(namedElement2)); } - @Test - public void testTypeProviderCyclicOverride() { + @org.junit.jupiter.api.Test + void testTypeProviderCyclicOverride() { ITypeProvider provider = new CyclicOverrideTypeProvider(); assertEquals("cyclic override type for expression1 not type1", type1, provider.getType(expression1)); assertEquals("cyclic override type for expression2 not type1", type1, provider.getType(expression2)); @@ -136,8 +136,8 @@ public void testTypeProviderCyclicOverride() { assertEquals("cyclic override type for namedElement2 not type3", type3, provider.getTypeForNamedElement(namedElement2)); } - @Test - public void testTypeProviderCyclicOverrideMixed() { + @org.junit.jupiter.api.Test + void testTypeProviderCyclicOverrideMixed() { ITypeProvider provider = new CyclicOverrideMixedTypeProvider(); assertEquals("cyclic mixed type for expression1 not type1", type1, provider.getType(expression1)); assertEquals("cyclic mixed type for expression2 not type1", type1, provider.getType(expression2)); @@ -148,13 +148,13 @@ public void testTypeProviderCyclicOverrideMixed() { } @Test - public void testDelegatingTypeProvider() { + void testDelegatingTypeProvider() { delegateProvider = new PlainTypeProvider(); testPlainProvider(new DelegatingTypeProvider()); } @Test - public void testDoNothingTypeProvider() { + void testDoNothingTypeProvider() { // we are mainly testing that the AbstractTypeProvider does not crash when the subclass does nothing ITypeProvider provider = new DoNothingTypeProvider(); assertNull("did something for type of expression1", provider.getType(expression1)); diff --git a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccessTest.java b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccessTest.java index 401681d46..92ed94a19 100644 --- a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccessTest.java +++ b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccessTest.java @@ -10,18 +10,18 @@ *******************************************************************************/ package com.avaloq.tools.ddk.typesystem; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import org.eclipse.emf.common.util.EList; -import org.junit.Test; import com.avaloq.tools.ddk.typesystem.builtintypemodel.BuiltInTypeModel; import com.avaloq.tools.ddk.typesystem.builtintypemodel.InternalType; import com.avaloq.tools.ddk.typesystem.typemodel.INamedType; +import org.junit.jupiter.api.Test; /** @@ -30,8 +30,8 @@ @SuppressWarnings("nls") public class BuiltInTypeModelAccessTest { - @Test - public void testLoadModel() { + @org.junit.jupiter.api.Test + void testLoadModel() { BuiltInTypeModelAccess typeModelInstance = BuiltInTypeModelAccess.getInstance(); BuiltInTypeModel model = typeModelInstance.getModel(); assertNotNull("Model was created", model); @@ -49,8 +49,8 @@ private void assertPresence(final String name) { assertEquals("Actual type name matches", name, t.getName()); } - @Test - public void testHasInternalTypes() { + @org.junit.jupiter.api.Test + void testHasInternalTypes() { assertPresence(BuiltInTypeModelAccess.ANY_TYPE_NAME); assertPresence(BuiltInTypeModelAccess.ERROR_TYPE_NAME); assertPresence(BuiltInTypeModelAccess.UNDETERMINED_TYPE_NAME); @@ -58,14 +58,14 @@ public void testHasInternalTypes() { } @Test - public void testInvalidInternalTypeNames() { + void testInvalidInternalTypeNames() { assertNull("Null name returns null", BuiltInTypeModelAccess.getInstance().getInternalType(null)); assertNull("Empty name returns null", BuiltInTypeModelAccess.getInstance().getInternalType("")); assertNull("Non-existant name returns null", BuiltInTypeModelAccess.getInstance().getInternalType("xyz!!")); } - @Test - public void testUniqueInternalTypes() { + @org.junit.jupiter.api.Test + void testUniqueInternalTypes() { assertUnique(BuiltInTypeModelAccess.ANY_TYPE_NAME); assertUnique(BuiltInTypeModelAccess.ERROR_TYPE_NAME); assertUnique(BuiltInTypeModelAccess.UNDETERMINED_TYPE_NAME); diff --git a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java index efb8ed087..b35d6e25d 100644 --- a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java +++ b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java @@ -10,9 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.typesystem; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import java.util.ArrayList; import java.util.List; @@ -20,7 +20,6 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.junit.Test; import com.avaloq.tools.ddk.typesystem.IParameterMatchChecker.IMatchResult; import com.avaloq.tools.ddk.typesystem.ParameterListMatcher.ParameterListMatchResult; @@ -33,6 +32,7 @@ import com.avaloq.tools.ddk.typesystem.typemodel.INamedFormalParameter; import com.avaloq.tools.ddk.typesystem.typemodel.IType; import com.avaloq.tools.ddk.typesystem.typemodel.impl.NamedTypeImpl; +import org.junit.jupiter.api.Test; // You can't have too many tests @@ -210,13 +210,13 @@ private void checkParameterMatch(final IParameterMatchChecker.MatchStatus status } @Test - public void testNoneAgainstNone() { + void testNoneAgainstNone() { ParameterListMatchResult matchResult = parameterListMatcher.match(new ArrayList(), new ArrayList(), parameterMatcher, CASE_INSENSITIVE); checkParameterListResult(ParameterListMatchStatus.MATCH_SUCCESSFUL, 0, 0, matchResult); } @Test - public void testOneUnnamedAgainstOne() { + void testOneUnnamedAgainstOne() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); List actuals = new ArrayList(); @@ -227,8 +227,8 @@ public void testOneUnnamedAgainstOne() { checkParameterMatch(IParameterMatchChecker.MatchStatus.MATCH, actuals.get(0), formals.get(0), matches.get(0)); } - @Test - public void testOneNamedAgainstOne() { + @org.junit.jupiter.api.Test + void testOneNamedAgainstOne() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); List actuals = new ArrayList(); @@ -239,8 +239,8 @@ public void testOneNamedAgainstOne() { checkParameterMatch(IParameterMatchChecker.MatchStatus.MATCH, actuals.get(0), formals.get(0), matches.get(0)); } - @Test - public void testOneNamedAgainstOneCaseSensitive() { + @org.junit.jupiter.api.Test + void testOneNamedAgainstOneCaseSensitive() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1.toUpperCase(Locale.getDefault()), intType)); List actuals = new ArrayList(); @@ -260,8 +260,8 @@ public void testOneNamedAgainstOneCaseSensitive() { checkParameterMatch(IParameterMatchChecker.MatchStatus.NO_MATCH_FOR_NAMED_ACTUAL, actuals.get(0), null, matches.get(0)); } - @Test - public void testOneUnnamedAgainstNone() { + @org.junit.jupiter.api.Test + void testOneUnnamedAgainstNone() { List formals = new ArrayList(); List actuals = new ArrayList(); actuals.add(new ActualParameter(intType)); @@ -272,7 +272,7 @@ public void testOneUnnamedAgainstNone() { } @Test - public void testOneNamedAgainstNone() { + void testOneNamedAgainstNone() { List formals = new ArrayList(); List actuals = new ArrayList(); actuals.add(new NamedActualParameter(NAME_1, intType)); @@ -283,7 +283,7 @@ public void testOneNamedAgainstNone() { } @Test - public void testNoneAgainstOne() { + void testNoneAgainstOne() { List formals = new ArrayList(); NamedFormalParameter mandatoryParam = new NamedFormalParameter(NAME_1, intType); formals.add(mandatoryParam); @@ -295,7 +295,7 @@ public void testNoneAgainstOne() { } @Test - public void testNoneAgainstTwoMandatory() { + void testNoneAgainstTwoMandatory() { // one mandatory and one not mandatory List formals = new ArrayList(); NamedFormalParameter mandatoryParam1 = new NamedFormalParameter(NAME_1, intType); @@ -310,8 +310,8 @@ public void testNoneAgainstTwoMandatory() { assertSame(INCORRECT_UNMATCHED_MANDATORY_FORMAL, mandatoryParam2, matchResult.getUnmatchedMandatoryFormalParameters().get(1)); } - @Test - public void testNoneAgainstTwoMixed() { + @org.junit.jupiter.api.Test + void testNoneAgainstTwoMixed() { // one mandatory and one not mandatory List formals = new ArrayList(); NamedFormalParameter mandatoryParam = new NamedFormalParameter(NAME_1, intType); @@ -325,7 +325,7 @@ public void testNoneAgainstTwoMixed() { } @Test - public void testThreeUnnamedWithOneTypeError() { + void testThreeUnnamedWithOneTypeError() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -343,7 +343,7 @@ public void testThreeUnnamedWithOneTypeError() { } @Test - public void testThreeNamedWithOneTypeError() { + void testThreeNamedWithOneTypeError() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -361,7 +361,7 @@ public void testThreeNamedWithOneTypeError() { } @Test - public void testThreeMixedAgainstThreeMandatory() { + void testThreeMixedAgainstThreeMandatory() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -379,7 +379,7 @@ public void testThreeMixedAgainstThreeMandatory() { } @Test - public void testTwoMixedAgainstThreeMandatory() { + void testTwoMixedAgainstThreeMandatory() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -395,7 +395,7 @@ public void testTwoMixedAgainstThreeMandatory() { } @Test - public void testTwoMixedAgainstThreeWithOptional() { + void testTwoMixedAgainstThreeWithOptional() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType, IS_OPTIONAL, !IS_MULTI)); @@ -411,7 +411,7 @@ public void testTwoMixedAgainstThreeWithOptional() { } @Test - public void testTwoUnnamedAgainstThreeWithOptional() { + void testTwoUnnamedAgainstThreeWithOptional() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -423,7 +423,7 @@ public void testTwoUnnamedAgainstThreeWithOptional() { } @Test - public void testUnnamedTooManyActuals() { + void testUnnamedTooManyActuals() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -442,7 +442,7 @@ public void testUnnamedTooManyActuals() { } @Test - public void testFourUnnamedAgainstTwoWithMulti() { + void testFourUnnamedAgainstTwoWithMulti() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType, IS_MANDATORY, IS_MULTI)); @@ -455,7 +455,7 @@ public void testFourUnnamedAgainstTwoWithMulti() { } @Test - public void testFourNamedAgainstTwoWithMulti() { + void testFourNamedAgainstTwoWithMulti() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType, IS_MANDATORY, IS_MULTI)); @@ -474,7 +474,7 @@ public void testFourNamedAgainstTwoWithMulti() { } @Test - public void testTwoUnNamedAgainstTwoPositional() { + void testTwoUnNamedAgainstTwoPositional() { List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(textType)); @@ -493,7 +493,7 @@ private void check2Successful(final List formals, final List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(textType, IS_MANDATORY, IS_MULTI)); @@ -516,7 +516,7 @@ private void check4Successful(final List formals, final List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(textType, IS_MANDATORY, IS_MULTI)); @@ -535,7 +535,7 @@ public void testFourUnNamedAgainstTwoPositionalwithMultiAndTypeError() { } @Test - public void testNamedAgainstPositional() { + void testNamedAgainstPositional() { List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(textType)); @@ -550,7 +550,7 @@ public void testNamedAgainstPositional() { } @Test - public void testMissingMandatoryAgainstPositional() { + void testMissingMandatoryAgainstPositional() { List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(textType)); @@ -562,8 +562,8 @@ public void testMissingMandatoryAgainstPositional() { checkParameterMatch(IParameterMatchChecker.MatchStatus.MATCH, actuals.get(0), formals.get(0), matches.get(0)); } - @Test - public void testInvalidActualNull() { + @org.junit.jupiter.api.Test + void testInvalidActualNull() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, textType)); @@ -581,7 +581,7 @@ public void testInvalidActualNull() { } @Test - public void testInvalidActualNullWithMulti() { + void testInvalidActualNullWithMulti() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, textType, IS_MANDATORY, IS_MULTI)); @@ -598,7 +598,7 @@ public void testInvalidActualNullWithMulti() { } @Test - public void testInvalidNamedActualNullName() { + void testInvalidNamedActualNullName() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, textType, IS_OPTIONAL, !IS_MULTI)); @@ -609,7 +609,7 @@ public void testInvalidNamedActualNullName() { } @Test - public void testInvalidNamedActualBlankName() { + void testInvalidNamedActualBlankName() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, textType, IS_OPTIONAL, !IS_MULTI)); @@ -627,8 +627,8 @@ private void check2WithNullFormal1(final List formals, fin checkParameterMatch(IParameterMatchChecker.MatchStatus.INVALID_ACTUAL, actuals.get(1), null, matches.get(1)); } - @Test - public void testInvalidFormalNull() { + @org.junit.jupiter.api.Test + void testInvalidFormalNull() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(null); @@ -646,7 +646,7 @@ public void testInvalidFormalNull() { } @Test - public void testInvalidFormalNullName() { + void testInvalidFormalNullName() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(null, intType)); @@ -664,7 +664,7 @@ public void testInvalidFormalNullName() { } @Test - public void testInvalidActualNullNameInvalidFormalNullName() { + void testInvalidActualNullNameInvalidFormalNullName() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(null, intType)); @@ -681,8 +681,8 @@ public void testInvalidActualNullNameInvalidFormalNullName() { checkParameterMatch(IParameterMatchChecker.MatchStatus.INVALID_ACTUAL, actuals.get(2), null, matches.get(2)); } - @Test - public void testDuplicateFormalName() { + @org.junit.jupiter.api.Test + void testDuplicateFormalName() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_1, intType, IS_OPTIONAL, !IS_MULTI)); @@ -699,7 +699,7 @@ public void testDuplicateFormalName() { } @Test - public void testDuplicateNamedActual() { + void testDuplicateNamedActual() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -716,8 +716,8 @@ public void testDuplicateNamedActual() { checkParameterMatch(IParameterMatchChecker.MatchStatus.DUPLICATE_NAMED_ACTUAL, actuals.get(2), formals.get(1), matches.get(2)); } - @Test - public void testPositionalAfterNamed1() { + @org.junit.jupiter.api.Test + void testPositionalAfterNamed1() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -734,8 +734,8 @@ public void testPositionalAfterNamed1() { checkParameterMatch(IParameterMatchChecker.MatchStatus.POSITIONAL_AFTER_NAMED, actuals.get(2), null, matches.get(2)); } - @Test - public void testPositionalAfterNamed2() { + @org.junit.jupiter.api.Test + void testPositionalAfterNamed2() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, textType)); @@ -758,8 +758,8 @@ public void testPositionalAfterNamed2() { } - @Test - public void testNamedMatchesPositional() { + @org.junit.jupiter.api.Test + void testNamedMatchesPositional() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -777,7 +777,7 @@ public void testNamedMatchesPositional() { } @Test - public void testNamedFormalAfterUnnamed1() { + void testNamedFormalAfterUnnamed1() { // these are allowed, match named by position. List formals = new ArrayList(); formals.add(new FormalParameter(intType)); @@ -788,8 +788,8 @@ public void testNamedFormalAfterUnnamed1() { check2Successful(formals, actuals); } - @Test - public void testNamedFormalAfterUnnamed2() { + @org.junit.jupiter.api.Test + void testNamedFormalAfterUnnamed2() { // these are allowed, match named by name. List formals = new ArrayList(); formals.add(new FormalParameter(intType)); @@ -800,8 +800,8 @@ public void testNamedFormalAfterUnnamed2() { check2Successful(formals, actuals); } - @Test - public void testNamedFormalAfterUnnamed3() { + @org.junit.jupiter.api.Test + void testNamedFormalAfterUnnamed3() { // these are allowed, match named by name, unnamed and named optional List formals = new ArrayList(); formals.add(new FormalParameter(intType, !IS_MANDATORY, !IS_MULTI)); @@ -824,7 +824,7 @@ private void verifyOneUnnamedFormalAfterNamed(final List formal } @Test - public void testUnnamedFormalAfterNamed1() { + void testUnnamedFormalAfterNamed1() { // unnamed is matched by position List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); @@ -846,7 +846,7 @@ public void testUnnamedFormalAfterNamed1() { } @Test - public void testUnnamedFormalAfterNamed2() { + void testUnnamedFormalAfterNamed2() { // unnamed is optional, at end and not matched because fewer formal parameters List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); @@ -858,7 +858,7 @@ public void testUnnamedFormalAfterNamed2() { } @Test - public void testUnnamedFormalAfterNamed3() { + void testUnnamedFormalAfterNamed3() { // unnamed is mandatory, at end and not matched because fewer formal parameters List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); @@ -870,7 +870,7 @@ public void testUnnamedFormalAfterNamed3() { } @Test - public void testUnnamedFormalAfterNamed4() { + void testUnnamedFormalAfterNamed4() { // two unnamed formals after named List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -890,7 +890,7 @@ public void testUnnamedFormalAfterNamed4() { } @Test - public void testForceMatchByPosition1() { + void testForceMatchByPosition1() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -907,8 +907,8 @@ public void testForceMatchByPosition1() { checkParameterMatch(IParameterMatchChecker.MatchStatus.MATCH, actuals.get(2), formals.get(2), matches.get(2)); } - @Test - public void testForceMatchByPosition2() { + @org.junit.jupiter.api.Test + void testForceMatchByPosition2() { List formals = new ArrayList(); formals.add(new NamedFormalParameter(NAME_1, intType)); formals.add(new NamedFormalParameter(NAME_2, intType)); @@ -925,8 +925,8 @@ public void testForceMatchByPosition2() { checkParameterMatch(IParameterMatchChecker.MatchStatus.MATCH, actuals.get(2), formals.get(2), matches.get(2)); } - @Test - public void testForceMatchByPosition3() { + @org.junit.jupiter.api.Test + void testForceMatchByPosition3() { List formals = new ArrayList(); formals.add(new FormalParameter(intType)); formals.add(new FormalParameter(intType)); diff --git a/com.avaloq.tools.ddk.typesystem/.classpath b/com.avaloq.tools.ddk.typesystem/.classpath index c5154d80b..c36791f98 100644 --- a/com.avaloq.tools.ddk.typesystem/.classpath +++ b/com.avaloq.tools.ddk.typesystem/.classpath @@ -7,7 +7,7 @@ - + diff --git a/com.avaloq.tools.ddk.typesystem/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.typesystem/META-INF/MANIFEST.MF index 4aa72ab40..9d094860b 100644 --- a/com.avaloq.tools.ddk.typesystem/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.typesystem/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.typesystem Bundle-SymbolicName: com.avaloq.tools.ddk.typesystem;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Import-Package: org.apache.logging.log4j Require-Bundle: org.eclipse.xtext, org.eclipse.core.runtime, diff --git a/com.avaloq.tools.ddk.typesystem/pom.xml b/com.avaloq.tools.ddk.typesystem/pom.xml index 37eadffea..a896057bf 100644 --- a/com.avaloq.tools.ddk.typesystem/pom.xml +++ b/com.avaloq.tools.ddk.typesystem/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.workflow/.classpath b/com.avaloq.tools.ddk.workflow/.classpath index b0bfa5067..5540ec29d 100644 --- a/com.avaloq.tools.ddk.workflow/.classpath +++ b/com.avaloq.tools.ddk.workflow/.classpath @@ -1,7 +1,7 @@ - + diff --git a/com.avaloq.tools.ddk.workflow/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.workflow/META-INF/MANIFEST.MF index 5ace3be37..de828c2f0 100644 --- a/com.avaloq.tools.ddk.workflow/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.workflow/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.workflow Bundle-SymbolicName: com.avaloq.tools.ddk.workflow -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: com.avaloq.tools.ddk.xtext, com.avaloq.tools.ddk.xtext.check.generator, com.avaloq.tools.ddk.xtext.export, diff --git a/com.avaloq.tools.ddk.workflow/pom.xml b/com.avaloq.tools.ddk.workflow/pom.xml index 5e4060b00..5fd846496 100644 --- a/com.avaloq.tools.ddk.workflow/pom.xml +++ b/com.avaloq.tools.ddk.workflow/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.builder.ui/.classpath b/com.avaloq.tools.ddk.xtext.builder.ui/.classpath index a8ff086a3..25c660d31 100644 --- a/com.avaloq.tools.ddk.xtext.builder.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.builder.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.builder.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.builder.ui/META-INF/MANIFEST.MF index fbf920d8b..9ad866ab7 100644 --- a/com.avaloq.tools.ddk.xtext.builder.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.builder.ui/META-INF/MANIFEST.MF @@ -2,13 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.builder.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.builder.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG Require-Bundle: org.eclipse.core.runtime, org.eclipse.xtext, org.eclipse.xtext.builder, org.eclipse.xtext.ui Export-Package: com.avaloq.tools.ddk.xtext.builder.ui.shared -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Import-Package: org.apache.logging.log4j Automatic-Module-Name: com.avaloq.tools.ddk.xtext.builder.ui diff --git a/com.avaloq.tools.ddk.xtext.builder.ui/pom.xml b/com.avaloq.tools.ddk.xtext.builder.ui/pom.xml index 9eb8649ed..71505dd8e 100644 --- a/com.avaloq.tools.ddk.xtext.builder.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.builder.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.builder/.classpath b/com.avaloq.tools.ddk.xtext.builder/.classpath index a8ff086a3..25c660d31 100644 --- a/com.avaloq.tools.ddk.xtext.builder/.classpath +++ b/com.avaloq.tools.ddk.xtext.builder/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.builder/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.builder/META-INF/MANIFEST.MF index 96f1e30cd..6ee350f1a 100644 --- a/com.avaloq.tools.ddk.xtext.builder/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.builder/META-INF/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.builder Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.builder;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG Require-Bundle: org.eclipse.xtext.builder, org.eclipse.xtext.ui, com.avaloq.tools.ddk, com.avaloq.tools.ddk.xtext, org.eclipse.xtext.common.types.ui -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.xtext.builder, com.avaloq.tools.ddk.xtext.builder.layered, com.avaloq.tools.ddk.xtext.builder.resourceloader, diff --git a/com.avaloq.tools.ddk.xtext.builder/pom.xml b/com.avaloq.tools.ddk.xtext.builder/pom.xml index ca9fc4a6b..443135244 100644 --- a/com.avaloq.tools.ddk.xtext.builder/pom.xml +++ b/com.avaloq.tools.ddk.xtext.builder/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.check.generator/.classpath b/com.avaloq.tools.ddk.xtext.check.generator/.classpath index f73a0454f..26f051475 100644 --- a/com.avaloq.tools.ddk.xtext.check.generator/.classpath +++ b/com.avaloq.tools.ddk.xtext.check.generator/.classpath @@ -3,7 +3,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.check.generator/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.check.generator/META-INF/MANIFEST.MF index f03e69294..f5a3f5629 100644 --- a/com.avaloq.tools.ddk.xtext.check.generator/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.check.generator/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.check.generator Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.check.generator;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.xtext.generator, diff --git a/com.avaloq.tools.ddk.xtext.check.generator/pom.xml b/com.avaloq.tools.ddk.xtext.check.generator/pom.xml index 4e3b4f9a1..6d77f72a4 100644 --- a/com.avaloq.tools.ddk.xtext.check.generator/pom.xml +++ b/com.avaloq.tools.ddk.xtext.check.generator/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.common.types.ui/.classpath b/com.avaloq.tools.ddk.xtext.common.types.ui/.classpath index 18a74ffc9..1ba37a025 100644 --- a/com.avaloq.tools.ddk.xtext.common.types.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.common.types.ui/.classpath @@ -1,7 +1,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.common.types.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.common.types.ui/META-INF/MANIFEST.MF index 953b75c8b..fd039f65f 100644 --- a/com.avaloq.tools.ddk.xtext.common.types.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.common.types.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.common.types.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.common.types.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext.common.types, org.eclipse.jdt.core, diff --git a/com.avaloq.tools.ddk.xtext.common.types.ui/pom.xml b/com.avaloq.tools.ddk.xtext.common.types.ui/pom.xml index 154721f17..d918f1e74 100644 --- a/com.avaloq.tools.ddk.xtext.common.types.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.common.types.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.common.types/.classpath b/com.avaloq.tools.ddk.xtext.common.types/.classpath index 18a74ffc9..1ba37a025 100644 --- a/com.avaloq.tools.ddk.xtext.common.types/.classpath +++ b/com.avaloq.tools.ddk.xtext.common.types/.classpath @@ -1,7 +1,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.common.types/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.common.types/META-INF/MANIFEST.MF index 5097edffb..5c949c8fc 100644 --- a/com.avaloq.tools.ddk.xtext.common.types/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.common.types/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.common.types Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.common.types;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.jdt.core, diff --git a/com.avaloq.tools.ddk.xtext.common.types/pom.xml b/com.avaloq.tools.ddk.xtext.common.types/pom.xml index 6bc1a455a..bee14ffb1 100644 --- a/com.avaloq.tools.ddk.xtext.common.types/pom.xml +++ b/com.avaloq.tools.ddk.xtext.common.types/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.common.ui/.classpath b/com.avaloq.tools.ddk.xtext.common.ui/.classpath index b0bfa5067..5540ec29d 100644 --- a/com.avaloq.tools.ddk.xtext.common.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.common.ui/.classpath @@ -1,7 +1,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.common.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.common.ui/META-INF/MANIFEST.MF index cffdbb973..cbcef8a9b 100644 --- a/com.avaloq.tools.ddk.xtext.common.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.common.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.common.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.common.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.xtext.common.ui.contentassist Require-Bundle: org.eclipse.xtext.ui Automatic-Module-Name: com.avaloq.tools.ddk.xtext.common.ui diff --git a/com.avaloq.tools.ddk.xtext.common.ui/pom.xml b/com.avaloq.tools.ddk.xtext.common.ui/pom.xml index 0d9f876a3..cab8c55a8 100644 --- a/com.avaloq.tools.ddk.xtext.common.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.common.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.export.generator/.classpath b/com.avaloq.tools.ddk.xtext.export.generator/.classpath index b9e2af03c..8d8d75407 100644 --- a/com.avaloq.tools.ddk.xtext.export.generator/.classpath +++ b/com.avaloq.tools.ddk.xtext.export.generator/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export.generator/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.export.generator/META-INF/MANIFEST.MF index 4a8d531c3..f53cf935a 100644 --- a/com.avaloq.tools.ddk.xtext.export.generator/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.export.generator/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.export.generator Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.export.generator;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.xtext.generator, org.eclipse.emf.codegen.ecore;resolution:=optional, diff --git a/com.avaloq.tools.ddk.xtext.export.generator/pom.xml b/com.avaloq.tools.ddk.xtext.export.generator/pom.xml index fb5e03fab..272a7d128 100644 --- a/com.avaloq.tools.ddk.xtext.export.generator/pom.xml +++ b/com.avaloq.tools.ddk.xtext.export.generator/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.export.ide/.classpath b/com.avaloq.tools.ddk.xtext.export.ide/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.export.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.export.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.export.ide/META-INF/MANIFEST.MF index b9628c2f1..8715de244 100644 --- a/com.avaloq.tools.ddk.xtext.export.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.export.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.export.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.export.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.export.ide.contentassist.antlr, com.avaloq.tools.ddk.xtext.export.ide.contentassist.antlr.internal diff --git a/com.avaloq.tools.ddk.xtext.export.ide/pom.xml b/com.avaloq.tools.ddk.xtext.export.ide/pom.xml index 09965a152..e919b1f1e 100644 --- a/com.avaloq.tools.ddk.xtext.export.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.export.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.export.test/.classpath b/com.avaloq.tools.ddk.xtext.export.test/.classpath index cb0da6517..7bd8e591b 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/.classpath +++ b/com.avaloq.tools.ddk.xtext.export.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export.test/ExportTestSuite.launch b/com.avaloq.tools.ddk.xtext.export.test/ExportTestSuite.launch index ff3b55aa2..701a7a1cd 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/ExportTestSuite.launch +++ b/com.avaloq.tools.ddk.xtext.export.test/ExportTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.export.test/META-INF/MANIFEST.MF index e871516e0..4b9aa1147 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.export.test/META-INF/MANIFEST.MF @@ -2,15 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.export.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.export.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Fragment-Host: com.avaloq.tools.ddk.xtext.export.ui Require-Bundle: com.avaloq.tools.ddk.xtext.export, com.google.inject, com.avaloq.tools.ddk.xtext.test.core, - org.junit, + org.junit.jupiter.api, com.avaloq.tools.ddk.xtext Export-Package: com.avaloq.tools.ddk.xtext.test.export Automatic-Module-Name: com.avaloq.tools.ddk.xtext.export.test diff --git a/com.avaloq.tools.ddk.xtext.export.test/pom.xml b/com.avaloq.tools.ddk.xtext.export.test/pom.xml index c29dcdd0d..9c062b156 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.export.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/exporting/ExportExportingTest.java b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/exporting/ExportExportingTest.java index b76a3504e..6a6d0ae3c 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/exporting/ExportExportingTest.java +++ b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/exporting/ExportExportingTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.export.exporting; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; import com.avaloq.tools.ddk.xtext.test.export.util.ExportTestUtil; @@ -28,7 +28,7 @@ protected ExportTestUtil getXtextTestUtil() { } @Test - public final void testExport() { + final void testExport() { // TODO - what should we test? } diff --git a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/scoping/ExportScopingTest.java b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/scoping/ExportScopingTest.java index f8034d1f7..059baa20d 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/scoping/ExportScopingTest.java +++ b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/scoping/ExportScopingTest.java @@ -10,14 +10,14 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.export.scoping; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import java.io.IOException; import org.eclipse.xtext.naming.QualifiedName; import org.eclipse.xtext.scoping.IScope; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.export.export.ExportModel; import com.avaloq.tools.ddk.xtext.export.export.ExportPackage; @@ -42,7 +42,7 @@ protected ExportTestUtil getXtextTestUtil() { } @Test - public void testImportPackageScope() throws IOException { + void testImportPackageScope() throws IOException { ExportModel model = (ExportModel) getTestSource().getModel(); IScope scope = scopeProvider.scope_Import_package(model.getImports().get(0), ExportPackage.Literals.IMPORT__PACKAGE); assertNotNull("Could not locate Import.", scope.getSingleElement(QualifiedName.create("http://www.avaloq.com/tools/ddk/xtext/export/Export"))); @@ -50,7 +50,7 @@ public void testImportPackageScope() throws IOException { } @Test - public void testEclassScope() throws IOException { + void testEclassScope() throws IOException { ExportModel model = (ExportModel) getTestSource().getModel(); IScope scope = scopeProvider.scope_EClass(model, null); assertNotNull("Could not locate EClass.", scope.getSingleElement(QualifiedName.create("InterfaceExpression"))); @@ -58,7 +58,7 @@ public void testEclassScope() throws IOException { } @Test - public void testEStructuralFeatureScope() throws IOException { + void testEStructuralFeatureScope() throws IOException { ExportModel model = (ExportModel) getTestSource().getModel(); IScope scope = scopeProvider.scope_EStructuralFeature(model.getInterfaces().get(0), null); // CHECKSTYLE:OFF (DuplicateString) @@ -68,7 +68,7 @@ public void testEStructuralFeatureScope() throws IOException { } @Test - public void testEAttributeScope() throws IOException { + void testEAttributeScope() throws IOException { ExportModel model = (ExportModel) getTestSource().getModel(); IScope scope = scopeProvider.scope_EAttribute(model.getInterfaces().get(0), null); // CHECKSTYLE:OFF (DuplicateString) @@ -78,7 +78,7 @@ public void testEAttributeScope() throws IOException { } @Test - public void testInterfaceNavigationRefScope() throws IOException { + void testInterfaceNavigationRefScope() throws IOException { ExportModel model = (ExportModel) getTestSource().getModel(); IScope scope = scopeProvider.scope_InterfaceNavigation_ref(model.getInterfaces().get(0), null); // CHECKSTYLE:OFF (DuplicateString) diff --git a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationOkTest.java b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationOkTest.java index 68a802d17..e6b06b6f3 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationOkTest.java +++ b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationOkTest.java @@ -10,10 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.export.validation; -import org.junit.Test; - import com.avaloq.tools.ddk.xtext.test.export.util.ExportTestUtil; import com.avaloq.tools.ddk.xtext.test.validation.AbstractValidationTest; +import org.junit.jupiter.api.Test; /** @@ -26,8 +25,8 @@ protected ExportTestUtil getXtextTestUtil() { return ExportTestUtil.getInstance(); } - @Test - public final void testCheckAll() { + @org.junit.jupiter.api.Test + final void testCheckAll() { assertNoDiagnostics(); } diff --git a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationTest.java b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationTest.java index c96191977..8a61f39e9 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/export/validation/ExportValidationTest.java @@ -10,10 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.export.validation; -import org.junit.Test; - import com.avaloq.tools.ddk.xtext.test.export.util.ExportTestUtil; import com.avaloq.tools.ddk.xtext.test.validation.AbstractValidationTest; +import org.junit.jupiter.api.Test; /** @@ -26,29 +25,29 @@ protected ExportTestUtil getXtextTestUtil() { return ExportTestUtil.getInstance(); } - @Test - public final void testCheckExtensions() { + @org.junit.jupiter.api.Test + final void testCheckExtensions() { // TODO cannot test as unable to load resource in test environment assertDiagnosticMessage("Extension 'XYZ' not found"); } - @Test - public final void testCheckInterfaceAndExportUniqueness() { + @org.junit.jupiter.api.Test + final void testCheckInterfaceAndExportUniqueness() { assertDiagnosticMessage("declaration duplicate found: ecore::EClass"); } @Test - public final void testCheckExportFieldUniqueness() { + final void testCheckExportFieldUniqueness() { assertDiagnosticMessage("duplicate found: instanceClassName"); } - @Test - public final void testCheckUserDataNameAsFeature() { + @org.junit.jupiter.api.Test + final void testCheckUserDataNameAsFeature() { assertDiagnosticMessage("instanceClassName is already defined as field"); // TODO assertDiagnosticMessage("xxx has the same name as an existing feature"); } @Test - public final void testCheckOverlap() { + final void testCheckOverlap() { // TODO assertDiagnosticMessage(""); } diff --git a/com.avaloq.tools.ddk.xtext.export.ui/.classpath b/com.avaloq.tools.ddk.xtext.export.ui/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.xtext.export.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.export.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.export.ui/META-INF/MANIFEST.MF index a0b99afeb..109dce38d 100644 --- a/com.avaloq.tools.ddk.xtext.export.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.export.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.export.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.export.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.xtext.export.ui.internal.ExportActivator Bundle-ActivationPolicy: lazy Eclipse-ExtensibleAPI: true diff --git a/com.avaloq.tools.ddk.xtext.export.ui/pom.xml b/com.avaloq.tools.ddk.xtext.export.ui/pom.xml index 3821b5471..143082da7 100644 --- a/com.avaloq.tools.ddk.xtext.export.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.export.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.export/.classpath b/com.avaloq.tools.ddk.xtext.export/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.export/.classpath +++ b/com.avaloq.tools.ddk.xtext.export/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.export/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.export/META-INF/MANIFEST.MF index a1548fd2a..7caef88ee 100644 --- a/com.avaloq.tools.ddk.xtext.export/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.export/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.export Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.export;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, org.eclipse.xtend, diff --git a/com.avaloq.tools.ddk.xtext.export/pom.xml b/com.avaloq.tools.ddk.xtext.export/pom.xml index 4e276fe20..95256d92a 100644 --- a/com.avaloq.tools.ddk.xtext.export/pom.xml +++ b/com.avaloq.tools.ddk.xtext.export/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.expression.ide/.classpath b/com.avaloq.tools.ddk.xtext.expression.ide/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.expression.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.expression.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.expression.ide/META-INF/MANIFEST.MF index 5cfadd502..d8fbdc08c 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.expression.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.expression.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.expression.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.expression.ide.contentassist.antlr, com.avaloq.tools.ddk.xtext.expression.ide.contentassist.antlr.internal diff --git a/com.avaloq.tools.ddk.xtext.expression.ide/pom.xml b/com.avaloq.tools.ddk.xtext.expression.ide/pom.xml index 31dd67133..3e0f5b3bc 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.expression.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.expression.ui/.classpath b/com.avaloq.tools.ddk.xtext.expression.ui/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.expression.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.expression.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.expression.ui/META-INF/MANIFEST.MF index df89fed2e..8c5bf5fbe 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.expression.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.expression.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.expression.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.xtext.expression.ui.internal.Activator Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext.ui, diff --git a/com.avaloq.tools.ddk.xtext.expression.ui/pom.xml b/com.avaloq.tools.ddk.xtext.expression.ui/pom.xml index a4a63fbff..08711d772 100644 --- a/com.avaloq.tools.ddk.xtext.expression.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.expression.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.expression/.classpath b/com.avaloq.tools.ddk.xtext.expression/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.expression/.classpath +++ b/com.avaloq.tools.ddk.xtext.expression/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.expression/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.expression/META-INF/MANIFEST.MF index b97b054db..438348081 100644 --- a/com.avaloq.tools.ddk.xtext.expression/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.expression/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.expression Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.expression;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.xtext, org.eclipse.xtend, org.eclipse.xtend.typesystem.emf, diff --git a/com.avaloq.tools.ddk.xtext.expression/pom.xml b/com.avaloq.tools.ddk.xtext.expression/pom.xml index 7c8b235ac..0f36102bf 100644 --- a/com.avaloq.tools.ddk.xtext.expression/pom.xml +++ b/com.avaloq.tools.ddk.xtext.expression/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.format.generator/.classpath b/com.avaloq.tools.ddk.xtext.format.generator/.classpath index b9e2af03c..8d8d75407 100644 --- a/com.avaloq.tools.ddk.xtext.format.generator/.classpath +++ b/com.avaloq.tools.ddk.xtext.format.generator/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format.generator/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format.generator/META-INF/MANIFEST.MF index 031cba798..66a627746 100644 --- a/com.avaloq.tools.ddk.xtext.format.generator/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format.generator/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format.generator Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.generator;singleton:=true Require-Bundle: com.avaloq.tools.ddk.xtext.format;visibility:=reexport, org.eclipse.xpand, @@ -15,6 +15,6 @@ Require-Bundle: com.avaloq.tools.ddk.xtext.format;visibility:=reexport, org.eclipse.jdt.core;visibility:=reexport, org.apache.commons.logging Import-Package: org.apache.logging.log4j,org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.xtext.format.generator Automatic-Module-Name: com.avaloq.tools.ddk.xtext.format.generator diff --git a/com.avaloq.tools.ddk.xtext.format.generator/pom.xml b/com.avaloq.tools.ddk.xtext.format.generator/pom.xml index 69201991b..76ffeb76d 100644 --- a/com.avaloq.tools.ddk.xtext.format.generator/pom.xml +++ b/com.avaloq.tools.ddk.xtext.format.generator/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.format.ide/.classpath b/com.avaloq.tools.ddk.xtext.format.ide/.classpath index 8ec3ddfe0..66b475530 100644 --- a/com.avaloq.tools.ddk.xtext.format.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.format.ide/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format.ide/META-INF/MANIFEST.MF index 2efba6e1a..68552439e 100644 --- a/com.avaloq.tools.ddk.xtext.format.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.antlr.runtime, org.eclipse.xtext.xbase.ide, diff --git a/com.avaloq.tools.ddk.xtext.format.ide/pom.xml b/com.avaloq.tools.ddk.xtext.format.ide/pom.xml index 8ba804193..27d43fa98 100644 --- a/com.avaloq.tools.ddk.xtext.format.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.format.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.format.test/.classpath b/com.avaloq.tools.ddk.xtext.format.test/.classpath index 7ca755775..bc8caf168 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/.classpath +++ b/com.avaloq.tools.ddk.xtext.format.test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format.test/FormatTestSuite.launch b/com.avaloq.tools.ddk.xtext.format.test/FormatTestSuite.launch index e54b391a3..bfcf09a16 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/FormatTestSuite.launch +++ b/com.avaloq.tools.ddk.xtext.format.test/FormatTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format.test/META-INF/MANIFEST.MF index 37dad6454..4f6792682 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format.test/META-INF/MANIFEST.MF @@ -2,15 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Fragment-Host: com.avaloq.tools.ddk.xtext.format.ui Require-Bundle: com.avaloq.tools.ddk.xtext.format, com.google.inject, com.avaloq.tools.ddk.xtext.test.core, - org.junit, + org.junit.jupiter.api, org.mockito, org.eclipse.xtext.xbase.lib, org.eclipse.xtext.xbase.testing, diff --git a/com.avaloq.tools.ddk.xtext.format.test/pom.xml b/com.avaloq.tools.ddk.xtext.format.test/pom.xml index 39da7ea3c..7021b3a79 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.format.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/FormatParsingTest.xtend b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/FormatParsingTest.xtend index a196c100c..21631106d 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/FormatParsingTest.xtend +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/FormatParsingTest.xtend @@ -8,8 +8,8 @@ import com.google.inject.Inject import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper -import org.junit.Assert -import org.junit.Test +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import org.junit.runner.RunWith @RunWith(XtextRunner) @@ -23,8 +23,8 @@ class FormatParsingTest { val result = parseHelper.parse(''' Hello Xtext! ''') - Assert.assertNotNull(result) + Assertions.assertNotNull(result) val errors = result.eResource.errors - Assert.assertTrue('''Unexpected errors: «errors.join(", ")»''', errors.isEmpty) + Assertions.assertTrue('''Unexpected errors: «errors.join(", ")»''', errors.isEmpty) } } diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/builder/FormatBuilderParticipantTest.java b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/builder/FormatBuilderParticipantTest.java index ed47fca61..2800f6d1c 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/builder/FormatBuilderParticipantTest.java +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/builder/FormatBuilderParticipantTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.format.builder; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -21,7 +21,7 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.xtext.resource.IResourceDescription.Delta; import org.eclipse.xtext.resource.IResourceServiceProvider; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatcher; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; @@ -66,8 +66,8 @@ protected void beforeAllTests() { /** * Tests whether a {@link Delta} resource has a correct extension to be used by org.eclipse.xtext.builder.BuilderParticipant. */ - @Test - public void hasCorrectExtensionTest() { + @org.junit.jupiter.api.Test + void hasCorrectExtensionTest() { IResourceServiceProvider resourceServiceProvider = mock(IResourceServiceProvider.class); when(resourceServiceProvider.canHandle(argThat(new IsUri()))).thenReturn(true, false); assertTrue("Check if the delta resource has correct extension", participant.hasCorrectExtension(delta, resourceServiceProvider)); @@ -78,7 +78,7 @@ public void hasCorrectExtensionTest() { * Tests whether a {@link Delta} resource comes form the right (SRC) directory to be used by org.eclipse.xtext.builder.BuilderParticipant. */ @Test - public void isSourceOriginatedTest() { + void isSourceOriginatedTest() { when(uriCorrect.segments()).thenReturn(CORRECT_URI_SEGMENTS); assertTrue("Check if the delta resource has correct URI and comes from SRC directory", participant.isSourceOriginated(delta)); when(uriCorrect.segments()).thenReturn(BIN_URI_SEGMENTS); diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopingTest.java b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopingTest.java index 8762e6350..b242bb8d1 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopingTest.java +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopingTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.format.scoping; -import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.List; import java.util.Set; @@ -27,7 +27,7 @@ import org.eclipse.xtext.nodemodel.ICompositeNode; import org.eclipse.xtext.nodemodel.ILeafNode; import org.eclipse.xtext.nodemodel.util.NodeModelUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.format.format.FormatConfiguration; import com.avaloq.tools.ddk.xtext.format.format.FormatPackage; @@ -101,14 +101,14 @@ protected void beforeEachTest() { * Bug AIG-718. * Tests that all grammars' rules are scoped. */ - @Test - public void allGrammarsScoped() { + @org.junit.jupiter.api.Test + void allGrammarsScoped() { Set expectedURIs = Sets.newHashSet(EcoreUtil.getURI(grammarC.getRules().get(0)), EcoreUtil.getURI(grammarB.getRules().get(0)), EcoreUtil.getURI(grammarA.getRules().get(0)), EcoreUtil.getURI(grammarA.getRules().get(1))); assertScope(formatC, FormatPackage.Literals.GRAMMAR_RULE__TARGET_RULE, expectedURIs); } - @Test - public void keywordScoped() { + @org.junit.jupiter.api.Test + void keywordScoped() { AbstractRule parserRuleA = grammarA.getRules().get(0); Set keywordURIs = Sets.newHashSet(Iterables.transform(GrammarUtil.containedKeywords(parserRuleA), TO_URI)); assertFalse("No keywords found", keywordURIs.isEmpty()); @@ -124,7 +124,7 @@ public void keywordScoped() { * Verify assignemnts (=a, =b ...) are scoped. */ @Test - public void assignmentScoped() { + void assignmentScoped() { AbstractRule parserRuleA = grammarA.getRules().get(0); Set assignmentURIs = Sets.newHashSet(Iterables.transform(GrammarUtil.containedAssignments(parserRuleA), TO_URI)); assertFalse("No assignments found", assignmentURIs.isEmpty()); @@ -136,7 +136,7 @@ public void assignmentScoped() { * Verify Rule { @Rule : ...}. */ @Test - public void ruleCallScoped() { + void ruleCallScoped() { AbstractRule parserRuleAA = grammarA.getRules().get(1); Set ruleCallURIs = Sets.newHashSet(Iterables.transform(GrammarUtil.containedRuleCalls(parserRuleAA), TO_URI)); assertScope(formatA.getRules().get(1), FormatPackage.Literals.GRAMMAR_ELEMENT_REFERENCE__RULE_CALL, ruleCallURIs); @@ -147,13 +147,13 @@ public void ruleCallScoped() { * Verify Rule { rule : ...}. */ @Test - public void ruleSelfScoped() { + void ruleSelfScoped() { AbstractRule parserRuleA = grammarA.getRules().get(0); assertScope(formatC.getRules().get(0), FormatPackage.Literals.GRAMMAR_ELEMENT_REFERENCE__SELF, TO_URI.apply(parserRuleA)); } - @Test - public void groupScoped() { + @org.junit.jupiter.api.Test + void groupScoped() { ParserRule parserRuleA = (ParserRule) grammarA.getRules().get(0); CompoundElement group1 = findSemanticElementByString("(", CompoundElement.class, parserRuleA); // ('-' b=STRING | ('-'c=ID ('-'d=INT | '-'e=STRING)))? diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/validation/FormatValidationTest.java b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/validation/FormatValidationTest.java index 1e3919b30..54c485b8b 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/validation/FormatValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/format/validation/FormatValidationTest.java @@ -10,12 +10,12 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.format.validation; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.fail; import java.io.IOException; import java.util.List; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.format.format.FormatConfiguration; import com.avaloq.tools.ddk.xtext.test.format.util.FormatTestUtil; @@ -102,8 +102,8 @@ private FormatConfiguration createModel(final String formatName, final String ex /** * Tests that non-'rule' directives are invalid in a terminal rule context. */ - @Test - public void testNegativeACF1000() { + @org.junit.jupiter.api.Test + void testNegativeACF1000() { setFormattingRules(new String[0], "INT_EXP { \"e\" : no_space around;}"); assertDiagnostic(parentFormat, FormatValidator.ILLEGAL_DIRECTIVE_CODE); } @@ -111,8 +111,8 @@ public void testNegativeACF1000() { /** * Tests that 'rule' directives are valid in a terminal rule context. */ - @Test - public void testPositiveACF1000() { + @org.junit.jupiter.api.Test + void testPositiveACF1000() { setFormattingRules(new String[0], "INT_EXP { rule : no_space around;}"); assertNoDiagnostic(parentFormat, FormatValidator.ILLEGAL_DIRECTIVE_CODE); } @@ -120,8 +120,8 @@ public void testPositiveACF1000() { /** * Verify that IllegalOverride validation issues error for WildcardRules. */ - @Test - public void illegalWildcardRuleOverride() { + @org.junit.jupiter.api.Test + void illegalWildcardRuleOverride() { setFormattingRules(new String[] {OVERRIDE_WILDCARD_RULE}); assertDiagnostic(extendingFormat, FormatValidator.OVERRIDE_ILLEGAL_CODE); } @@ -130,7 +130,7 @@ public void illegalWildcardRuleOverride() { * Verify that IllegalOverride validation issues error for GrammarRules. */ @Test - public void illegalGrammarRuleOverride() { + void illegalGrammarRuleOverride() { setFormattingRules(new String[] {OVERRIDE_INT_EXP_RULE}); assertDiagnostic(extendingFormat, FormatValidator.OVERRIDE_ILLEGAL_CODE); } @@ -138,8 +138,8 @@ public void illegalGrammarRuleOverride() { /** * Verify that OverrideMissing validation issues error for WildcardRules. */ - @Test - public void missingWildcardRuleOverride() { + @org.junit.jupiter.api.Test + void missingWildcardRuleOverride() { setFormattingRules(new String[] {WILDCARD_RULE}, WILDCARD_RULE); assertDiagnostic(extendingFormat, FormatValidator.OVERRIDE_MISSING_CODE); @@ -149,7 +149,7 @@ public void missingWildcardRuleOverride() { * Verify that OverrideMissing validation issues error for GrammarRules. */ @Test - public void missingGrammarRuleOverride() { + void missingGrammarRuleOverride() { setFormattingRules(new String[] {INT_EXP_RULE}, INT_EXP_RULE); assertDiagnostic(extendingFormat, FormatValidator.OVERRIDE_MISSING_CODE); } @@ -157,8 +157,8 @@ public void missingGrammarRuleOverride() { /** * Verify that OverrideMissing nor IllegalOverride validations issue no error. */ - @Test - public void wildcardRuleOverrideOK() { + @org.junit.jupiter.api.Test + void wildcardRuleOverrideOK() { setFormattingRules(new String[] {OVERRIDE_WILDCARD_RULE}, WILDCARD_RULE); assertNoDiagnostic(extendingFormat, FormatValidator.OVERRIDE_MISSING_CODE); assertNoDiagnostic(extendingFormat, FormatValidator.OVERRIDE_ILLEGAL_CODE); @@ -167,8 +167,8 @@ public void wildcardRuleOverrideOK() { /** * Verify that OverrideMissing nor IllegalOverride validations issue no error. */ - @Test - public void grammarRuleOverrideOK() { + @org.junit.jupiter.api.Test + void grammarRuleOverrideOK() { setFormattingRules(new String[] {OVERRIDE_INT_EXP_RULE}, INT_EXP_RULE); assertNoDiagnostic(extendingFormat, FormatValidator.OVERRIDE_MISSING_CODE); assertNoDiagnostic(extendingFormat, FormatValidator.OVERRIDE_ILLEGAL_CODE); @@ -177,8 +177,8 @@ public void grammarRuleOverrideOK() { /** * Verify that ExtendedGrammarCompatible validation issues error when grammars of the Format models are incompatible. */ - @Test - public void extendedGrammarCompatible() { + @org.junit.jupiter.api.Test + void extendedGrammarCompatible() { try { getXtextTestUtil().getModel("MyDsl.xtext", "grammar com.avaloq.tools.ddk.xtext.format.validation.MyDsl\nimport \"http://www.eclipse.org/emf/2002/Ecore\" as ecore\nRule: 'rule';"); } catch (IOException e) { @@ -191,8 +191,8 @@ public void extendedGrammarCompatible() { /** * Verify that ExtendedGrammarCompatible validation issues no error. */ - @Test - public void extendedGrammarCompatibleOK() { + @org.junit.jupiter.api.Test + void extendedGrammarCompatibleOK() { createModel(PARENT_MODEL_NAME, null); FormatConfiguration extendModel = createModel(EXTENDING_MODEL_NAME, PARENT_MODEL_NAME); assertNoDiagnostic(extendModel, FormatValidator.EXTENDED_GRAMMAR_INCOMPATIBLE_CODE); @@ -203,7 +203,7 @@ public void extendedGrammarCompatibleOK() { * formatting rule must be defined in the extending configuration if it is defined in the parent. */ @Test - public void requiredRulesImplemented() { + void requiredRulesImplemented() { setFormattingRules(new String[0], "Rule {}"); assertDiagnostic(extendingFormat, FormatValidator.GRAMMAR_RULE_MISSING_CODE); } diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java index 289ccd3ec..f72244c23 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.format.util; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.fail; import java.io.IOException; diff --git a/com.avaloq.tools.ddk.xtext.format.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format.ui.test/META-INF/MANIFEST.MF index 1e6934ff1..737b05a50 100644 --- a/com.avaloq.tools.ddk.xtext.format.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format.ui.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format.ui.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.ui.test;singleton:=true Bundle-Version: 0.0.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.format.ui;x-internal=true Require-Bundle: org.eclipse.core.runtime, diff --git a/com.avaloq.tools.ddk.xtext.format.ui/.classpath b/com.avaloq.tools.ddk.xtext.format.ui/.classpath index f54589fac..9e1b01881 100644 --- a/com.avaloq.tools.ddk.xtext.format.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.format.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format.ui/META-INF/MANIFEST.MF index 4a1a529a3..312673807 100644 --- a/com.avaloq.tools.ddk.xtext.format.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format.ui Bundle-Vendor: Avaloq Group AG -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.ui;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext.format;visibility:=reexport, @@ -28,7 +28,7 @@ Require-Bundle: com.avaloq.tools.ddk.xtext.format;visibility:=reexport, org.eclipse.xtext.ui.codetemplates.ui, org.eclipse.xtend.lib;resolution:=optional Import-Package: org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.xtext.format.ui.builder, com.avaloq.tools.ddk.xtext.format.ui.contentassist, com.avaloq.tools.ddk.xtext.format.ui.quickfix, diff --git a/com.avaloq.tools.ddk.xtext.format.ui/pom.xml b/com.avaloq.tools.ddk.xtext.format.ui/pom.xml index a46af05f9..98842c406 100644 --- a/com.avaloq.tools.ddk.xtext.format.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.format.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.format/.classpath b/com.avaloq.tools.ddk.xtext.format/.classpath index 5b73d99c4..7e674d9ee 100644 --- a/com.avaloq.tools.ddk.xtext.format/.classpath +++ b/com.avaloq.tools.ddk.xtext.format/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.format/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.format/META-INF/MANIFEST.MF index b0ca91027..9115b9c9b 100644 --- a/com.avaloq.tools.ddk.xtext.format/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.format/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.format Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.xtext.generator, diff --git a/com.avaloq.tools.ddk.xtext.format/pom.xml b/com.avaloq.tools.ddk.xtext.format/pom.xml index 8a9c3573f..a65e301a1 100644 --- a/com.avaloq.tools.ddk.xtext.format/pom.xml +++ b/com.avaloq.tools.ddk.xtext.format/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.generator.test/.classpath b/com.avaloq.tools.ddk.xtext.generator.test/.classpath index 634cf2fe1..ed47baa3c 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/.classpath +++ b/com.avaloq.tools.ddk.xtext.generator.test/.classpath @@ -1,7 +1,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.generator.test/GeneratorTestSuite.launch b/com.avaloq.tools.ddk.xtext.generator.test/GeneratorTestSuite.launch index 284c59cf0..f9d99a2b7 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/GeneratorTestSuite.launch +++ b/com.avaloq.tools.ddk.xtext.generator.test/GeneratorTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.generator.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.generator.test/META-INF/MANIFEST.MF index 21e880e34..797de957c 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.generator.test/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.generator.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.generator.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Fragment-Host: com.avaloq.tools.ddk.xtext.generator Require-Bundle: com.avaloq.tools.ddk.test.core, @@ -13,7 +13,7 @@ Require-Bundle: com.avaloq.tools.ddk.test.core, org.eclipse.xtend, org.eclipse.xtend.typesystem.emf, org.eclipse.xtext, - org.junit, + org.junit.jupiter.api, org.mockito, com.avaloq.tools.ddk.xtext.ui, org.eclipse.xtext.xtext.generator diff --git a/com.avaloq.tools.ddk.xtext.generator.test/pom.xml b/com.avaloq.tools.ddk.xtext.generator.test/pom.xml index eb51a5b2e..b073e68a5 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.generator.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CodeGenerationXTest.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CodeGenerationXTest.java index 2d0e11135..6f42b65c8 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CodeGenerationXTest.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CodeGenerationXTest.java @@ -10,14 +10,14 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.generator.expression; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import org.eclipse.xtend.expression.ExecutionContextImpl; import org.eclipse.xtend.type.impl.java.JavaBeansMetaModel; import org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.expression.expression.Expression; import com.avaloq.tools.ddk.xtext.expression.generator.CompilationContext; @@ -60,7 +60,7 @@ protected String getTestSourceFileName() { } @Test - public void testliterals() throws Exception { + void testliterals() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("42", compile("42")); // NOPMD assertEquals("4.2", compile("4.2")); // NOPMD @@ -71,20 +71,20 @@ public void testliterals() throws Exception { // CHECKSTYLE:CONSTANTS-ON } - @Test - public void testListLiterals() throws Exception { + @org.junit.jupiter.api.Test + void testListLiterals() throws Exception { assertEquals("java.util.Collections. emptyList()", compile("{}")); // NOPMD assertEquals("java.util.Collections.singletonList(1)", compile("{1}")); // NOPMD assertEquals("com.google.common.collect.Lists.newArrayList(1, 2, 3)", compile("{1,2,3}")); // NOPMD } - @Test - public void testIdentifiers() throws Exception { + @org.junit.jupiter.api.Test + void testIdentifiers() throws Exception { assertEquals("obj.getTrue()", compile("^true")); // NOPMD } - @Test - public void testBracketing() throws Exception { + @org.junit.jupiter.api.Test + void testBracketing() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("(4 + 2) * 3", compile("(4 + 2) * 3")); // NOPMD assertEquals("(4 + 2) * 3 * 4", compile("(4 + 2) * 3 * 4")); // NOPMD @@ -96,7 +96,7 @@ public void testBracketing() throws Exception { } @Test - public void testBooleanLogic() throws Exception { + void testBooleanLogic() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("true", compile("true")); // NOPMD assertEquals("false", compile("false")); // NOPMD @@ -114,8 +114,8 @@ public void testBooleanLogic() throws Exception { // CHECKSTYLE:CONSTANTS-ON } - @Test - public void testArithmetics() throws Exception { + @org.junit.jupiter.api.Test + void testArithmetics() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("4 + 2", compile("4 + 2")); // NOPMD assertEquals("4 - 2", compile("4 - 2")); // NOPMD @@ -125,8 +125,8 @@ public void testArithmetics() throws Exception { // CHECKSTYLE:CONSTANTS-ON } - @Test - public void testPrefixExpressions() throws Exception { + @org.junit.jupiter.api.Test + void testPrefixExpressions() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("-(4 * 2)", compile("-(4 * 2)")); // NOPMD assertEquals("-(-42)", compile("-(-42)")); // NOPMD @@ -140,7 +140,7 @@ public void testPrefixExpressions() throws Exception { } @Test - public void testInfixExpressions() throws Exception { + void testInfixExpressions() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("(true ? 1 : 2) + 3", compile("(true ? 1 : 2) + 3")); // NOPMD assertEquals("!(true ? true : false)", compile("!(true ? true : false)")); // NOPMD @@ -148,37 +148,37 @@ public void testInfixExpressions() throws Exception { // CHECKSTYLE:CONSTANTS-ON } - @Test - public void testImplicitVariable() throws Exception { + @org.junit.jupiter.api.Test + void testImplicitVariable() throws Exception { assertEquals("obj", compile("this")); // NOPMD } @Test - public void testCasting() throws Exception { + void testCasting() throws Exception { assertEquals("((org.eclipse.emf.ecore.EObject) obj)", compile("(ecore::EObject) this")); // NOPMD } - @Test - public void testTypes() throws Exception { + @org.junit.jupiter.api.Test + void testTypes() throws Exception { assertEquals("org.eclipse.emf.ecore.EObject", compile("ecore::EObject")); // NOPMD assertEquals("String", compile("java::lang::String")); // NOPMD } - @Test - public void testIsInstance() throws Exception { + @org.junit.jupiter.api.Test + void testIsInstance() throws Exception { assertEquals("obj instanceof org.eclipse.emf.ecore.EObject", compile("ecore::EObject.isInstance(this)")); // NOPMD } @Test - public void testEContainerNavigation() throws Exception { + void testEContainerNavigation() throws Exception { // CHECKSTYLE:CONSTANTS-OFF assertEquals("obj.eContainer()", compile("this.eContainer")); // NOPMD assertEquals("obj.eContainer()", compile("this.eContainer()")); // NOPMD // CHECKSTYLE:CONSTANTS-ON } - @Test - public void testTypeSelect() throws Exception { + @org.junit.jupiter.api.Test + void testTypeSelect() throws Exception { assertEquals(// NOPMD "com.google.common.collect.Iterables.filter(obj.getFoos(), org.eclipse.emf.ecore.EObject.class)", compile("this.foos.typeSelect(ecore::EObject)")); assertEquals(// NOPMD @@ -186,13 +186,13 @@ public void testTypeSelect() throws Exception { } @Test - public void testCollectionExpression() throws Exception { + void testCollectionExpression() throws Exception { assertEquals(// NOPMD "com.google.common.collect.Iterables.filter(java.util.Collections.singletonList(obj), new com.google.common.base.Predicate() { public boolean apply(Object e) {return true;} })", compile("{this}.select(e|true)")); } @Test - public void testMultipleNavigations() throws Exception { + void testMultipleNavigations() throws Exception { assertEquals(// NOPMD "/* NOT COMPILABLE: Complex expressions like \"this.eContainer.eContainer\" cannot be translated to Java. Consider rewriting the expression or using a JAVA extension. */", compile("this.eContainer.eContainer")); assertEquals(// NOPMD diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CompilationContextTest.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CompilationContextTest.java index 4076a4340..ab43b055d 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CompilationContextTest.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/CompilationContextTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.generator.expression; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.InputStreamReader; @@ -20,7 +20,7 @@ import org.eclipse.xtend.expression.ExecutionContextImpl; import org.eclipse.xtend.type.impl.java.JavaBeansMetaModel; import org.eclipse.xtend.typesystem.Type; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.expression.generator.CompilationContext; @@ -28,7 +28,7 @@ public class CompilationContextTest { @Test - public void isExtension() { + void isExtension() { ExecutionContextImpl executionContext = new ExecutionContextImpl(); executionContext.registerMetaModel(new JavaBeansMetaModel()); ExtensionFile extensionFile = ParseFacade.file(new InputStreamReader(getClass().getResourceAsStream("/com/avaloq/tools/ddk/xtext/generator/expression/TestExtensions.ext")), "TestExtensions.ext"); @@ -39,7 +39,7 @@ public void isExtension() { } @Test - public void analyze() { + void analyze() { ExecutionContextImpl executionContext = new ExecutionContextImpl(); executionContext.registerMetaModel(new JavaBeansMetaModel()); final CompilationContext context = new CompilationContext(executionContext, null); diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/ExpressionsExtentionsTest.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/ExpressionsExtentionsTest.java index c55344faf..2687e99d6 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/ExpressionsExtentionsTest.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/expression/ExpressionsExtentionsTest.java @@ -10,11 +10,11 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.generator.expression; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.expression.expression.Expression; import com.avaloq.tools.ddk.xtext.expression.generator.ExpressionExtensions; @@ -38,7 +38,7 @@ protected String getTestSourceFileName() { } @Test - public final void serialize() throws IOException { + final void serialize() throws IOException { Expression e = (Expression) getXtextTestUtil().getModel("test.expression." + getXtextTestUtil().getFileExtension(), "let x = 1 : 0"); assertEquals("Simple serialization works", "let x = 1 : 0", ExpressionExtensions.serialize(e)); } diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/EClassComparatorTest.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/EClassComparatorTest.java index 36e0c08de..838e88d79 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/EClassComparatorTest.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/EClassComparatorTest.java @@ -15,7 +15,7 @@ import static org.eclipse.emf.ecore.EcorePackage.Literals.EDATA_TYPE; import static org.eclipse.emf.ecore.EcorePackage.Literals.EOBJECT; import static org.eclipse.emf.ecore.EcorePackage.Literals.EPACKAGE; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; @@ -23,13 +23,13 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.xtext.XtextPackage; -import org.junit.Test; import com.avaloq.tools.ddk.xtext.expression.generator.EClassComparator; import com.google.common.base.Function; import com.google.common.base.Functions; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; +import org.junit.jupiter.api.Test; @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") @@ -37,8 +37,8 @@ public class EClassComparatorTest { private final Function mapping = Functions. identity(); - @Test - public void testSorting() { + @org.junit.jupiter.api.Test + void testSorting() { List sorted = EClassComparator.sortedGroups(Lists.newArrayList(ECLASS, EDATA_TYPE, EPACKAGE, ECLASSIFIER), mapping); assertEquals(Lists.newArrayList(ECLASS, EDATA_TYPE, EPACKAGE, ECLASSIFIER), sorted); @@ -53,7 +53,7 @@ public void testSorting() { } @Test - public void testSortingWithEObject() { + void testSortingWithEObject() { List sorted = EClassComparator.sortedGroups(Lists.newArrayList(EOBJECT, ECLASS), mapping); assertEquals(Lists.newArrayList(ECLASS, EOBJECT), sorted); @@ -62,7 +62,7 @@ public void testSortingWithEObject() { } @Test - public void testSortingByEPackage() { + void testSortingByEPackage() { ListMultimap sorted = EClassComparator.sortedEPackageGroups(Lists.newArrayList(EOBJECT, ECLASS), mapping); assertEquals(2, sorted.size()); assertEquals(1, sorted.keySet().size()); diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GraphTest.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GraphTest.java index a822ee512..11099aaf8 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GraphTest.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GraphTest.java @@ -10,13 +10,13 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.generator.test.util; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.util.List; import java.util.Map; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.expression.generator.Graph; import com.google.common.collect.HashMultimap; @@ -29,7 +29,7 @@ public class GraphTest { // CHECKSTYLE:CONSTANTS-OFF @Test - public void testTopologicalSorting() { + void testTopologicalSorting() { Multimap graph = HashMultimap.create(); graph.put("7", "11"); graph.put("7", "8"); @@ -47,7 +47,7 @@ public void testTopologicalSorting() { } @Test - public void testDependencyCycle() { + void testDependencyCycle() { Multimap graph = ImmutableMultimap.of("1", "2", "2", "3", "3", "1"); try { diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/xbase/test/XbaseGeneratorFragmentTest.xtend b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/xbase/test/XbaseGeneratorFragmentTest.xtend index abdec160f..f20910b22 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/xbase/test/XbaseGeneratorFragmentTest.xtend +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/xbase/test/XbaseGeneratorFragmentTest.xtend @@ -12,7 +12,6 @@ package com.avaloq.tools.ddk.xtext.generator.xbase.test import com.avaloq.tools.ddk.test.core.BugTest -import junit.framework.TestCase import org.eclipse.emf.common.util.BasicEList import org.eclipse.emf.ecore.EPackage import org.eclipse.xtext.AbstractElement @@ -26,7 +25,7 @@ import org.eclipse.xtext.RuleCall import org.eclipse.xtext.TypeRef import org.eclipse.xtext.XtextPackage import org.eclipse.xtext.testing.XtextRunner -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import static org.mockito.Mockito.mock @@ -37,7 +36,7 @@ import org.eclipse.xtext.xtext.generator.xbase.XbaseUsageDetector * Tests for {@link XbaseUsageDetector}. */ @RunWith(XtextRunner) -class XbaseGeneratorFragmentTest extends TestCase { +class XbaseGeneratorFragmentTest { val thisPackageName = "thisPackage" val xtypePackageName = "xtype" diff --git a/com.avaloq.tools.ddk.xtext.generator/.classpath b/com.avaloq.tools.ddk.xtext.generator/.classpath index e4c926b70..aba0d9bb2 100644 --- a/com.avaloq.tools.ddk.xtext.generator/.classpath +++ b/com.avaloq.tools.ddk.xtext.generator/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.generator/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.generator/META-INF/MANIFEST.MF index d98af59a5..4be660520 100644 --- a/com.avaloq.tools.ddk.xtext.generator/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.generator/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.generator Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.generator;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.jface, org.eclipse.ui.views, org.eclipse.emf.codegen.ecore, diff --git a/com.avaloq.tools.ddk.xtext.generator/pom.xml b/com.avaloq.tools.ddk.xtext.generator/pom.xml index 22a52b211..6b47c32c0 100644 --- a/com.avaloq.tools.ddk.xtext.generator/pom.xml +++ b/com.avaloq.tools.ddk.xtext.generator/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.ide/.classpath b/com.avaloq.tools.ddk.xtext.ide/.classpath index a8ff086a3..25c660d31 100644 --- a/com.avaloq.tools.ddk.xtext.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.ide/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.ide/META-INF/MANIFEST.MF index 28c2e38a2..90673c3ef 100644 --- a/com.avaloq.tools.ddk.xtext.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.ide/META-INF/MANIFEST.MF @@ -2,12 +2,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG Require-Bundle: org.eclipse.lsp4j, org.eclipse.xtext.ide, com.avaloq.tools.ddk.xtext -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.ide.contentAssist, com.avaloq.tools.ddk.xtext.ide.formatting, diff --git a/com.avaloq.tools.ddk.xtext.ide/pom.xml b/com.avaloq.tools.ddk.xtext.ide/pom.xml index 20fadb313..0c3dd54ed 100644 --- a/com.avaloq.tools.ddk.xtext.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.scope.generator/.classpath b/com.avaloq.tools.ddk.xtext.scope.generator/.classpath index e785c372b..f70b2088b 100644 --- a/com.avaloq.tools.ddk.xtext.scope.generator/.classpath +++ b/com.avaloq.tools.ddk.xtext.scope.generator/.classpath @@ -2,7 +2,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.scope.generator/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.scope.generator/META-INF/MANIFEST.MF index cec900606..96d01aa9e 100644 --- a/com.avaloq.tools.ddk.xtext.scope.generator/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.scope.generator/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.scope.generator Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.scope.generator;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: com.avaloq.tools.ddk.xtext.scope;visibility:=reexport, org.eclipse.xtext, org.eclipse.xtext.xtext.generator, diff --git a/com.avaloq.tools.ddk.xtext.scope.generator/pom.xml b/com.avaloq.tools.ddk.xtext.scope.generator/pom.xml index aa08dc0e6..af775654a 100644 --- a/com.avaloq.tools.ddk.xtext.scope.generator/pom.xml +++ b/com.avaloq.tools.ddk.xtext.scope.generator/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.scope.ide/.classpath b/com.avaloq.tools.ddk.xtext.scope.ide/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.scope.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.scope.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.scope.ide/META-INF/MANIFEST.MF index 31a855d72..f9e7a52e6 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.scope.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.scope.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.scope.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.scope.ide.contentassist.antlr, com.avaloq.tools.ddk.xtext.scope.ide.contentassist.antlr.internal diff --git a/com.avaloq.tools.ddk.xtext.scope.ide/pom.xml b/com.avaloq.tools.ddk.xtext.scope.ide/pom.xml index 061083c75..265056d44 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.scope.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.scope.ui/.classpath b/com.avaloq.tools.ddk.xtext.scope.ui/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.scope.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.scope.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.scope.ui/META-INF/MANIFEST.MF index 4a18c4839..167480a1e 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.scope.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.scope.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.scope.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: com.avaloq.tools.ddk.xtext.scope.ui.internal.ScopeActivator Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext.ui, diff --git a/com.avaloq.tools.ddk.xtext.scope.ui/pom.xml b/com.avaloq.tools.ddk.xtext.scope.ui/pom.xml index d6e760963..61808bae7 100644 --- a/com.avaloq.tools.ddk.xtext.scope.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.scope.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.scope/.classpath b/com.avaloq.tools.ddk.xtext.scope/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.scope/.classpath +++ b/com.avaloq.tools.ddk.xtext.scope/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.scope/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.scope/META-INF/MANIFEST.MF index dd3fa16f1..39e10efd0 100644 --- a/com.avaloq.tools.ddk.xtext.scope/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.scope/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.scope Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.scope;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.xtext, com.avaloq.tools.ddk.xtext.expression;visibility:=reexport, org.eclipse.xtend, diff --git a/com.avaloq.tools.ddk.xtext.scope/pom.xml b/com.avaloq.tools.ddk.xtext.scope/pom.xml index a459d4bdc..c8c7f53c5 100644 --- a/com.avaloq.tools.ddk.xtext.scope/pom.xml +++ b/com.avaloq.tools.ddk.xtext.scope/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.test.core/.classpath b/com.avaloq.tools.ddk.xtext.test.core/.classpath index be88556be..d651646e4 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/.classpath +++ b/com.avaloq.tools.ddk.xtext.test.core/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF index 37ec33102..a0dcfb1a0 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.test.core Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.test.core;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: com.avaloq.tools.ddk.xtext, com.avaloq.tools.ddk.xtext.common.ui, com.avaloq.tools.ddk.xtext.ui, @@ -21,7 +21,7 @@ Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.xtext.ui, org.eclipse.xtext.xbase, org.eclipse.xtext.xbase.lib;visibility:=reexport, - org.junit, + org.junit.jupiter.api, org.mockito, org.hamcrest.library, com.avaloq.tools.ddk.check.runtime.core, diff --git a/com.avaloq.tools.ddk.xtext.test.core/pom.xml b/com.avaloq.tools.ddk.xtext.test.core/pom.xml index 619c583f7..c86a1a7d4 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/pom.xml +++ b/com.avaloq.tools.ddk.xtext.test.core/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractTest.java index 1e53e0e83..0f325eb85 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractTest.java @@ -26,10 +26,10 @@ import org.eclipse.emf.common.util.WrappedException; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.actions.WorkspaceModifyOperation; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; import org.junit.Rule; import org.junit.runner.RunWith; @@ -154,7 +154,7 @@ public final void tearDown() { * If it is run the first time, it calls the beforeClass method first. Do not call this method manually! * All exceptions are wrapped and handed over to the JUnit framework. */ - @Before + @BeforeEach public final void before() { beforeEachTest(); } @@ -164,7 +164,7 @@ public final void before() { * If no more tests are to be run, it calls the afterClass method. Do not call this method manually! * All exceptions are wrapped and handed over to the JUnit framework. */ - @After + @AfterEach public final void after() { afterEachTest(); } @@ -332,7 +332,7 @@ protected XtextTestSource getTestSource(final String sourceFileName) { */ protected TestSource getTestSource() { TestSource testSource = getTestProjectManager().getTestSource(getTestSourceFileName()); - // Assert.assertNotNull("TestSource for this test class can be found: " + getTestSourceFileName(), testSource); + // Assertions.assertNotNull("TestSource for this test class can be found: " + getTestSourceFileName(), testSource); return testSource; } @@ -363,7 +363,7 @@ protected String getTestSourceModelName() { private void enforceAnnotationPolicies() { for (Method method : this.getClass().getMethods()) { // use this policy to not allow BeforeClass or AfterClass annotations. - if (method.isAnnotationPresent(BeforeClass.class) || method.isAnnotationPresent(AfterClass.class)) { + if (method.isAnnotationPresent(BeforeAll.class) || method.isAnnotationPresent(AfterAll.class)) { throw new IllegalJUnitAnnotation(); } // use this policy to not allow Before or After annotations in subclasses. diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java index 9032a4011..619ccd8a5 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java @@ -10,10 +10,10 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.io.IOException; import java.util.Collections; @@ -30,7 +30,7 @@ import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.nodemodel.util.NodeModelUtils; import org.eclipse.xtext.xbase.lib.Procedures; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Lists; @@ -98,7 +98,7 @@ protected void afterEachTest() { protected void beforeEachTest() { localMarkerIdCounter = 0; super.beforeEachTest(); - Assert.assertFalse(INVALID_TEST_CONFIGURATION, getMarkerTagsInfo().isInvalidTestClass()); + Assertions.assertFalse(INVALID_TEST_CONFIGURATION, getMarkerTagsInfo().isInvalidTestClass()); } // -------------------------------------------------------------------------- @@ -269,7 +269,7 @@ protected String addAssertion(final AbstractModelAssertion assertion) { * @return Mark text to be inserted in the source file, never {@code null} */ protected String mark(final int id) { - Assert.assertFalse("Tag with " + id + " used to mark more than one location.", usedTags.contains(id)); //$NON-NLS-1$ //$NON-NLS-2$ + Assertions.assertFalse("Tag with " + id + " used to mark more than one location.", usedTags.contains(id)); //$NON-NLS-1$ //$NON-NLS-2$ usedTags.add(id); if (id < 1) { getMarkerTagsInfo().setTestClassInvalid(); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextTestUtil.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextTestUtil.java index b56948946..65334ad5f 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextTestUtil.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test; //NOPMD -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; import java.io.IOException; import java.io.InputStream; 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 8415facde..9f17a572c 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; @@ -33,7 +33,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.avaloq.tools.ddk.xtext.ui.util.Function; import com.avaloq.tools.ddk.xtext.ui.util.UiThreadDispatcher; @@ -183,11 +183,11 @@ public BadLocationException run() { 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()) + Assertions.assertTrue("matchString = '" + matchString + "', actual: '" + context.getPrefix() + "'", "".equals(context.getPrefix()) || matchString.equals(context.getPrefix())); } } else { - Assert.fail("No content assistant for content type " + contentType); + Assertions.fail("No content assistant for content type " + contentType); } } catch (BadLocationException e) { return 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 569fc457e..04121d71c 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; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/conversion/AbstractValueConverterServiceTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/conversion/AbstractValueConverterServiceTest.java index 1a877b1ea..0bcf9d031 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/conversion/AbstractValueConverterServiceTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/conversion/AbstractValueConverterServiceTest.java @@ -10,9 +10,9 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.conversion; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Collection; import java.util.List; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/formatting/AbstractFormattingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/formatting/AbstractFormattingTest.java index 561c3aff5..5852144e6 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/formatting/AbstractFormattingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/formatting/AbstractFormattingTest.java @@ -18,8 +18,8 @@ import org.eclipse.xtext.nodemodel.ICompositeNode; import org.eclipse.xtext.nodemodel.util.NodeModelUtils; import org.eclipse.xtext.resource.SaveOptions; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; @@ -68,7 +68,7 @@ protected String getExpectedTestSourceFileName() { * Test formatting based on the NodeModel. */ @Test - public void formattedNodeModel() { + void formattedNodeModel() { assertFormattedNodeModel(); } @@ -89,8 +89,8 @@ public void preservedParseTreeConstructor() { /** * Test preservation of formatting using NodeModelFormatter. */ - @Test - public void preservedNodeModel() { + @org.junit.jupiter.api.Test + void preservedNodeModel() { assertPreservedNodeModel(); } @@ -145,7 +145,7 @@ protected final void assertPreservedParseTreeConstructor() { */ private void assertFormattedParseTreeConstructor(final EObject model, final String expected) { String actual = getXtextTestUtil().getSerializer().serialize(model, SaveOptions.newBuilder().format().getOptions()); - Assert.assertEquals("Formatted ParseTree", expected.replaceAll(CR_LF, LF), actual.replaceAll(CR_LF, LF)); + Assertions.assertEquals("Formatted ParseTree", expected.replaceAll(CR_LF, LF), actual.replaceAll(CR_LF, LF)); } /** @@ -166,7 +166,7 @@ private void assertFormattedNodeModel(final EObject model, final String input, f ICompositeNode node = NodeModelUtils.getNode(model).getRootNode(); IFormattedRegion region = getXtextTestUtil().get(INodeModelFormatter.class).format(node, offset, length); String actual = input.substring(0, offset) + region.getFormattedText() + input.substring(length + offset); - Assert.assertEquals("Formatted NodeModel", expected.replaceAll(CR_LF, LF), actual.replaceAll(CR_LF, LF)); + Assertions.assertEquals("Formatted NodeModel", expected.replaceAll(CR_LF, LF), actual.replaceAll(CR_LF, LF)); } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/generator/AbstractGeneratorTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/generator/AbstractGeneratorTest.java index a9ae4fc86..e1840a10f 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/generator/AbstractGeneratorTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/generator/AbstractGeneratorTest.java @@ -43,8 +43,8 @@ import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil; import org.eclipse.xtext.ui.testing.util.JavaProjectSetupUtil; import org.eclipse.xtext.ui.util.PluginProjectFactory; -import org.junit.AfterClass; -import org.junit.Assert; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; import com.google.common.base.Functions; import com.google.common.base.Predicate; @@ -91,7 +91,7 @@ public abstract class AbstractGeneratorTest { /** * Clean up after all tests have terminated. */ - @AfterClass + @AfterAll public static void cleanUp() { try { IResourcesSetupUtil.cleanWorkspace(); @@ -320,15 +320,15 @@ protected void execute(final IProgressMonitor monitor) throws CoreException, Inv IResourcesSetupUtil.createFile(resourceURI.toPlatformString(true), contents); } catch (IOException e) { LOGGER.error("failed adding file to workspace: " + outputFileName, e); //$NON-NLS-1$ - Assert.fail("Error adding file " + outputFileName + " to workspace: " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ + Assertions.fail("Error adding file " + outputFileName + " to workspace: " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ } } } }.run(new NullProgressMonitor()); } catch (InvocationTargetException e) { - Assert.fail("Error adding files to workspace: " + e.getMessage()); //$NON-NLS-1$ + Assertions.fail("Error adding files to workspace: " + e.getMessage()); //$NON-NLS-1$ } catch (InterruptedException e) { - Assert.fail("Error adding files to workspace: " + e.getMessage()); //$NON-NLS-1$ + Assertions.fail("Error adding files to workspace: " + e.getMessage()); //$NON-NLS-1$ } } @@ -413,10 +413,10 @@ public String getContents(final String resourceName) throws IOException { */ public void assertFileGenerated(final String projectName, final String fileName, final String expectedGeneratedContent) throws IOException, CoreException { IFile generatedFile = getFileFromProject(projectName, fileName); - Assert.assertTrue(MessageFormat.format(MESSAGE_GENERATED_FILE_MUST_EXIST, generatedFile.toString()), generatedFile.exists()); + Assertions.assertTrue(MessageFormat.format(MESSAGE_GENERATED_FILE_MUST_EXIST, generatedFile.toString()), generatedFile.exists()); String actualGeneratedContent = getContents(generatedFile); - Assert.assertEquals(MessageFormat.format(MESSAGE_GENERATED_CODE_MUST_BE_CORRECT, generatedFile.toString()), expectedGeneratedContent, actualGeneratedContent); + Assertions.assertEquals(MessageFormat.format(MESSAGE_GENERATED_CODE_MUST_BE_CORRECT, generatedFile.toString()), expectedGeneratedContent, actualGeneratedContent); } /** diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/junit/runners/XtextClassRunner.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/junit/runners/XtextClassRunner.java index b616167c5..2618b3a96 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/junit/runners/XtextClassRunner.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/junit/runners/XtextClassRunner.java @@ -20,13 +20,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.eclipse.xtext.testing.XtextRunner; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.internal.AssumptionViolatedException; import org.junit.internal.runners.model.EachTestNotifier; import org.junit.internal.runners.statements.RunAfters; import org.junit.internal.runners.statements.RunBefores; +import org.junit.jupiter.api.Test; import org.junit.runner.Description; import org.junit.runner.manipulation.Filter; import org.junit.runner.manipulation.NoTestsRemainException; @@ -61,7 +61,7 @@ *

*

Test Methods

Considered are all those methods of the test class that are annotated with one (or more) of the following test annotations: *
    - *
  • {@link Test} + *
  • {@link org.junit.jupiter.api.Test} *
  • {@link UnitTest} *
  • {@link ModuleTest} *
  • {@link IntegrationTest} @@ -102,7 +102,7 @@ public class XtextClassRunner extends XtextRunner { /** Class-wide logger. */ private static final Logger LOGGER = LogManager.getLogger(XtextClassRunner.class); @SuppressWarnings("unchecked") - private static final List> TEST_ANNOTATIONS = Lists.newArrayList(Test.class, UnitTest.class, ModuleTest.class, IntegrationTest.class, SystemTest.class, PerformanceTest.class, BugTest.class); + private static final List> TEST_ANNOTATIONS = Lists.newArrayList(org.junit.jupiter.api.Test.class, UnitTest.class, ModuleTest.class, IntegrationTest.class, SystemTest.class, PerformanceTest.class, BugTest.class); private List expectedMethods; private int currentMethodIndex; private final int testRuns; @@ -141,7 +141,7 @@ private void ensureInitialized() { expectedMethods = ImmutableList.copyOf(Iterables.filter(testMethods, new Predicate() { @Override public boolean apply(final FrameworkMethod input) { - return input.getAnnotation(Ignore.class) == null; + return input.getAnnotation(Disabled.class) == null; } })); currentMethodIndex = 0; @@ -185,9 +185,9 @@ public void filter(final Filter filter) throws NoTestsRemainException { @Override protected void runChild(final FrameworkMethod method, final RunNotifier notifier) { ensureInitialized(); - final boolean ignored = method.getAnnotation(Ignore.class) != null; + final boolean ignored = method.getAnnotation(Disabled.class) != null; if (!ignored) { - Assert.assertEquals("Method " + method.getName() + " not equal", expectedMethods.get(currentMethodIndex++), method); //$NON-NLS-1$//$NON-NLS-2$ + Assertions.assertEquals("Method " + method.getName() + " not equal", expectedMethods.get(currentMethodIndex++), method); //$NON-NLS-1$//$NON-NLS-2$ } if (ignored || testRuns == 1 && testRetries == 0 && method.getAnnotation(Retry.class) == null) { super.runChild(method, notifier); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/linking/AbstractLinkingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/linking/AbstractLinkingTest.java index 14e526620..c57fc21ea 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/linking/AbstractLinkingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/linking/AbstractLinkingTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.linking; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; 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 38153b650..121b96949 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()); + Assertions.fail("Feature " + feature + " is not a feature of " + input.eClass()); } final Object valueOfFeature = input.eGet(feature); return valueOfFeature != null && valueOfFeature.equals(value); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/modelinference/AbstractModelInferrerTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/modelinference/AbstractModelInferrerTest.java index 4d4245bb6..e293e34ff 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/modelinference/AbstractModelInferrerTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/modelinference/AbstractModelInferrerTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.modelinference; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; import java.util.Set; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/resource/AbstractResourceDescriptionManagerTest.xtend b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/resource/AbstractResourceDescriptionManagerTest.xtend index f8b03f267..798827147 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/resource/AbstractResourceDescriptionManagerTest.xtend +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/resource/AbstractResourceDescriptionManagerTest.xtend @@ -18,7 +18,7 @@ import org.eclipse.emf.common.util.URI import java.util.Collection import org.eclipse.xtext.resource.IResourceDescription.Delta import com.google.common.collect.HashMultiset -import org.junit.Assert +import org.junit.jupiter.api.Assertions import com.google.common.collect.Sets import com.avaloq.tools.ddk.xtext.test.TestSource @@ -193,6 +193,6 @@ abstract class AbstractResourceDescriptionManagerTest extends AbstractXtextTest */ def assertDeltaAffectedResources(Collection deltas, Collection candidates, Collection expectedUris) { val result = getResourceDescriptionManager().getAffectedResources(deltas, candidates, getResourceDescriptions()); - Assert.assertEquals("Affected URIs must be correct.", HashMultiset.create(expectedUris), HashMultiset.create(result)); + Assertions.assertEquals("Affected URIs must be correct.", HashMultiset.create(expectedUris), HashMultiset.create(result)); } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java index ad5df858a..b57637671 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java @@ -17,11 +17,11 @@ import static com.avaloq.tools.ddk.xtext.resource.AbstractSelectorFragmentProvider.SELECTOR_START; import static com.avaloq.tools.ddk.xtext.resource.AbstractSelectorFragmentProvider.UNIQUE; import static com.avaloq.tools.ddk.xtext.resource.AbstractSelectorFragmentProvider.VALUE_SEP; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.util.ArrayList; import java.util.Collection; @@ -32,7 +32,6 @@ import java.util.function.Supplier; import java.util.regex.Pattern; -import org.eclipse.core.runtime.Assert; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; @@ -55,6 +54,7 @@ import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.util.Triple; import org.eclipse.xtext.xbase.lib.Pair; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.caching.Regexps; import com.avaloq.tools.ddk.xtext.linking.AbstractFragmentProvider; @@ -240,7 +240,7 @@ protected void assertScope(final EObject context, final EReference reference, fi * for given scope, must not be {@code null} */ protected void assertScopedObjects(final EObject context, final EReference reference, final EObject... expectedObjects) { - Assert.isNotNull(expectedObjects, PARAMETER_EXPECTED_OBJECTS); + Assertions.isNotNull(expectedObjects, PARAMETER_EXPECTED_OBJECTS); assertScopedObjects(context, reference, Lists.newArrayList(expectedObjects)); } @@ -258,8 +258,8 @@ protected void assertScopedObjects(final EObject context, final EReference refer */ @SuppressWarnings("unchecked") protected void assertScopedObjects(final EObject context, final EReference reference, final Collection firstExpectedObjectCollection, final Collection... furtherExpectedObjectCollections) { - Assert.isNotNull(firstExpectedObjectCollection, "firstExpectedObjectCollection"); - Assert.isNotNull(furtherExpectedObjectCollections, "furtherExpectedObjectCollections"); + Assertions.isNotNull(firstExpectedObjectCollection, "firstExpectedObjectCollection"); + Assertions.isNotNull(furtherExpectedObjectCollections, "furtherExpectedObjectCollections"); Collection consolidatedList = Lists.newArrayList(firstExpectedObjectCollection); for (Collection expectedObjects : furtherExpectedObjectCollections) { consolidatedList.addAll(expectedObjects); @@ -281,10 +281,10 @@ protected void assertScopedObjects(final EObject context, final EReference refer * the objects expected in the scope, must not be {@code null} */ protected void assertScopedObjects(final EObject context, final EReference reference, final Collection expectedObjects) { - Assert.isNotNull(context, PARAMETER_CONTEXT); - Assert.isNotNull(reference, PARAMETER_REFERENCE); - Assert.isNotNull(expectedObjects, PARAMETER_EXPECTED_OBJECTS); - Assert.isTrue(context.eClass().getEAllReferences().contains(reference), String.format("Contract for argument '%s' failed: Parameter is not within specified range (Expected: %s, Actual: %s).", PARAMETER_CONTEXT, "The context object must contain the given reference.", "Reference not contained by the context object!")); + Assertions.isNotNull(context, PARAMETER_CONTEXT); + Assertions.isNotNull(reference, PARAMETER_REFERENCE); + Assertions.isNotNull(expectedObjects, PARAMETER_EXPECTED_OBJECTS); + Assertions.isTrue(context.eClass().getEAllReferences().contains(reference), String.format("Contract for argument '%s' failed: Parameter is not within specified range (Expected: %s, Actual: %s).", PARAMETER_CONTEXT, "The context object must contain the given reference.", "Reference not contained by the context object!")); Set expectedUriSet = Sets.newHashSet(); for (EObject object : expectedObjects) { expectedUriSet.add(EcoreUtil.getURI(object)); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractUiTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractUiTest.java index 43683ac96..255dd1063 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractUiTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractUiTest.java @@ -114,7 +114,7 @@ public SwtWorkbenchBot getBot() { * @return the editor part or null */ protected IEditorPart openEditor(final IFile file, final String editorId, final boolean activate) { - UiAssert.isNotUiThread(); + UiAssertions.isNotUiThread(); IEditorPart editor = UIThreadRunnable.syncExec(getBot().getDisplay(), new Result() { @Override public IEditorPart run() { @@ -149,7 +149,7 @@ public IEditorPart run() { * true if should save before close, false otherwise */ protected void closeEditor(final IEditorPart editor, final boolean save) { - UiAssert.isNotUiThread(); + UiAssertions.isNotUiThread(); Object editorJobs = getTestUtil().getEditorJobFamily(editor); UIThreadRunnable.syncExec(getBot().getDisplay(), new VoidResult() { @Override diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextEditorTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextEditorTest.java index c0f4e81eb..9f5b23707 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextEditorTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextEditorTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.ui; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.jface.text.BadLocationException; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextUiTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextUiTest.java index 5c5e92d2f..ba214a460 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextUiTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/AbstractXtextUiTest.java @@ -88,7 +88,7 @@ protected void afterAllTests() { * @return {@link IEditorPart} created */ private IEditorPart openEditor(final org.eclipse.emf.common.util.URI uri, final boolean activate) { - UiAssert.isNotUiThread(); + UiAssertions.isNotUiThread(); final IEditorPart editorPart = UIThreadRunnable.syncExec(getBot().getDisplay(), new Result() { @Override public IEditorPart run() { diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/contentassist/AbstractContentAssistUiTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/contentassist/AbstractContentAssistUiTest.java index 8e8086ede..90eadb96c 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/contentassist/AbstractContentAssistUiTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/contentassist/AbstractContentAssistUiTest.java @@ -25,7 +25,7 @@ import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; import org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer; import org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.State; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.xtext.common.ui.contentassist.TemplatesFirstCompletionProposalComparator; import com.avaloq.tools.ddk.xtext.resource.Messages; @@ -112,9 +112,9 @@ public String apply(final ICompletionProposal from) { protected void assertContentAssist(final List contentassistProposals, final int offset) { evaluateCompletionProposals(offset); Arrays.sort(getCompletionProposals(), new TemplatesFirstCompletionProposalComparator()); - Assert.assertEquals("Same length", contentassistProposals.size(), getCompletionProposals().length); + Assertions.assertEquals("Same length", contentassistProposals.size(), getCompletionProposals().length); for (int i = 0; i < contentassistProposals.size(); i++) { - Assert.assertEquals("Same displayed string", contentassistProposals.get(i), getCompletionProposals()[i].getDisplayString()); + Assertions.assertEquals("Same displayed string", contentassistProposals.get(i), getCompletionProposals()[i].getDisplayString()); } } @@ -152,7 +152,7 @@ protected void assertTemplateProposalExistsAndSuccessful(final String sourceFile @SuppressWarnings("PMD.UseObjectForClearerAPI") protected void assertTemplateProposalExistsAndSuccessful(final String sourceFileName, final String sourceContent, final String contentassistProposal, final String expectedContent, final int offset) { if (sourceContent == null) { - Assert.assertNotNull(String.format("There must be an existing test source with the file name '%s'.", sourceFileName), getTestSource(sourceFileName)); + Assertions.assertNotNull(String.format("There must be an existing test source with the file name '%s'.", sourceFileName), getTestSource(sourceFileName)); } else { createTestSource(sourceFileName, sourceContent); } @@ -169,10 +169,10 @@ protected void assertTemplateProposalExistsAndSuccessful(final String sourceFile } } - Assert.assertNotNull(String.format("Template proposal '%s' must be found.", contentassistProposal), templateProposal); + Assertions.assertNotNull(String.format("Template proposal '%s' must be found.", contentassistProposal), templateProposal); String actualContent = applyTemplateProposal(templateProposal, offset); - Assert.assertEquals("Editor content must match expected result.", expectedContent.replaceAll(CR_LF, LF), actualContent.replaceAll(CR_LF, LF)); + Assertions.assertEquals("Editor content must match expected result.", expectedContent.replaceAll(CR_LF, LF), actualContent.replaceAll(CR_LF, LF)); closeEditor(getEditor(), false); } @@ -190,7 +190,7 @@ private String applyTemplateProposal(final TemplateProposal templateProposal, fi UiThreadDispatcher.dispatchAndWait(new Runnable() { @Override public void run() { - Assert.assertNotNull(EDITOR_HAS_NO_VIEWER, getViewer()); + Assertions.assertNotNull(EDITOR_HAS_NO_VIEWER, getViewer()); templateProposal.apply(getViewer(), ' ', 0, offset); } }); @@ -211,7 +211,7 @@ protected void assertProposalsAtOffsetExist(final int offset, final String... pr evaluateCompletionProposals(offset); final List result = getCompletionProposalDisplayStrings(getCompletionProposals()); for (final String s : proposals) { - Assert.assertTrue(Messages.bind("Expected proposal \"{0}\" but found \"{1}\"", s, result), result.contains(s)); + Assertions.assertTrue(Messages.bind("Expected proposal \"{0}\" but found \"{1}\"", s, result), result.contains(s)); } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/folding/AbstractFoldingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/folding/AbstractFoldingTest.java index ed168df67..7eaff403b 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/folding/AbstractFoldingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/folding/AbstractFoldingTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.ui.folding; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Collection; import java.util.Collections; @@ -23,7 +23,7 @@ import org.eclipse.xtext.ui.editor.folding.DefaultFoldedPosition; import org.eclipse.xtext.ui.editor.folding.FoldedPosition; import org.eclipse.xtext.ui.editor.folding.IFoldingRegionProvider; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.test.core.BugTest; import com.avaloq.tools.ddk.xtext.test.ui.AbstractXtextEditorTest; @@ -83,7 +83,7 @@ public boolean apply(final Position p) { // CHECKSTYLE:ON message.append("Unmatched Expected Positions:").append(unmatchedExpectedPositions).append('\n'); message.append("Unmatched Actual Positions:").append(unmatchedActualPositions); - Assert.assertTrue(message.toString(), unmatchedExpectedPositions.isEmpty()); + Assertions.assertTrue(message.toString(), unmatchedExpectedPositions.isEmpty()); } } @@ -96,7 +96,7 @@ public void testFoldedPositions() { Collection foldingRegions = getXtextTestUtil().get(IFoldingRegionProvider.class).getFoldingRegions(getDocument()); for (DefaultFoldedPosition foldedPosition : Iterables.filter(foldingRegions, DefaultFoldedPosition.class)) { try { - Assert.assertFalse("Illegal significant region for FoldedPosition " + foldedPosition, foldedPosition.computeCaptionOffset(getDocument()) < 0); + Assertions.assertFalse("Illegal significant region for FoldedPosition " + foldedPosition, foldedPosition.computeCaptionOffset(getDocument()) < 0); /* If the above assertion fails that is probably due to an ITextRegion.EMPTY_REGION being provided for the object's significant text region. */ } catch (BadLocationException e) { fail("Bad location for FoldedPosition: " + e.getMessage()); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hover/AbstractHoverTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hover/AbstractHoverTest.java index a29a2574b..289994d4b 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hover/AbstractHoverTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hover/AbstractHoverTest.java @@ -24,7 +24,7 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; @@ -153,7 +153,7 @@ private EList getFeatureValues(final EObject model, final EStructuralFe */ protected void assertHover(final ENamedElement element, final String firstLine) { assertElementExistInHoverMap(element); - Assert.assertTrue("Element '" + element.toString() + "' must have first line of hover '" + firstLine + "'. " + "\n\nHoverMap contains:\n" + Assertions.assertTrue("Element '" + element.toString() + "' must have first line of hover '" + firstLine + "'. " + "\n\nHoverMap contains:\n" + getHoverMap().get(element), hasTextOnFirstLine(getHoverMap().get(element), firstLine)); } @@ -167,7 +167,7 @@ protected void assertHover(final ENamedElement element, final String firstLine) */ protected void assertHoverDoesNotContainText(final ENamedElement element, final String text) { assertElementExistInHoverMap(element); - Assert.assertFalse("Element '" + element.toString() + "' first line of hover must not have '" + text + "'. " + "\n\nHoverMap contains:\n" + Assertions.assertFalse("Element '" + element.toString() + "' first line of hover must not have '" + text + "'. " + "\n\nHoverMap contains:\n" + getHoverMap().get(element), hasTextOnFirstLine(getHoverMap().get(element), text)); } @@ -178,7 +178,7 @@ protected void assertHoverDoesNotContainText(final ENamedElement element, final * element of the model with hover, must not be {@code null} */ private void assertElementExistInHoverMap(final ENamedElement element) { - Assert.assertTrue("Element '" + element.toString() + "' must exist.", getHoverMap().containsKey(element)); + Assertions.assertTrue("Element '" + element.toString() + "' must exist.", getHoverMap().containsKey(element)); } /** diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hyperlinking/AbstractHyperlinkHelperTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hyperlinking/AbstractHyperlinkHelperTest.java index d1821ecec..bf31d5071 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hyperlinking/AbstractHyperlinkHelperTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/hyperlinking/AbstractHyperlinkHelperTest.java @@ -28,7 +28,7 @@ import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.xtext.test.ui.AbstractXtextEditorTest; import com.google.common.base.Predicate; @@ -53,7 +53,7 @@ public abstract class AbstractHyperlinkHelperTest extends AbstractXtextEditorTes * the position at which to look for a hyperlink */ protected void assertOffsetHasHyperlink(final int offset) { - Assert.assertEquals(OFFSET_MUST_BE_EQUAL, 1, getOffsetHyperlinks(offset).size()); + Assertions.assertEquals(OFFSET_MUST_BE_EQUAL, 1, getOffsetHyperlinks(offset).size()); } /** @@ -63,7 +63,7 @@ protected void assertOffsetHasHyperlink(final int offset) { * the position at which to look for hyperlinks */ protected void assertOffsetHasNoHyperlink(final int offset) { - Assert.assertEquals(OFFSET_MUST_BE_EQUAL, 0, getOffsetHyperlinks(offset).size()); + Assertions.assertEquals(OFFSET_MUST_BE_EQUAL, 0, getOffsetHyperlinks(offset).size()); } /** @@ -95,7 +95,7 @@ protected void assertNoHyperlink(final int tag) { * number of expected hyperlinks */ protected void assertHasHyperlinks(final int tag, final int numberOfHyperlinks) { - Assert.assertEquals(NUMBER_OF_HYPERLINKS_MUST_BE_EQUAL, numberOfHyperlinks, getHyperlinks(tag).size()); + Assertions.assertEquals(NUMBER_OF_HYPERLINKS_MUST_BE_EQUAL, numberOfHyperlinks, getHyperlinks(tag).size()); } /** @@ -113,7 +113,7 @@ protected void assertHasHyperlinks(final int tag, final URI target) { actualTargets.add(((XtextHyperlink) hyperlink).getURI()); } } - MatcherAssert.assertThat("The target must have items", actualTargets, CoreMatchers.hasItem(target)); + MatcherAssertions.assertThat("The target must have items", actualTargets, CoreMatchers.hasItem(target)); } /** @@ -127,7 +127,7 @@ protected void assertHasHyperlinks(final int tag, final URI target) { * number of expected hyperlinks */ protected void assertHasHyperlinks(final XtextResource resource, final int tag, final int numberOfHyperlinks) { - Assert.assertEquals(NUMBER_OF_HYPERLINKS_MUST_BE_EQUAL, numberOfHyperlinks, getHyperlinks(resource, tag).size()); + Assertions.assertEquals(NUMBER_OF_HYPERLINKS_MUST_BE_EQUAL, numberOfHyperlinks, getHyperlinks(resource, tag).size()); } /** diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/labeling/AbstractLabelingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/labeling/AbstractLabelingTest.java index c1ced9244..40d0f2475 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/labeling/AbstractLabelingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/labeling/AbstractLabelingTest.java @@ -25,10 +25,10 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.xtext.util.Pair; import org.eclipse.xtext.util.Tuples; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; +import org.junit.jupiter.api.Test; /** @@ -49,8 +49,8 @@ protected List> getExpectedElementLabels() { /** * Tests that the expected elements and their labels are exactly identical to all elements of the default test resource. */ - @Test - public void testLabels() { + @org.junit.jupiter.api.Test + void testLabels() { if (getExpectedElementLabels() == null) { return; // TODO: remove this check once all tests have been refactored } @@ -106,8 +106,8 @@ private Map> getLabelMap() { // NOPMD LooseCoupling * the expected label */ protected void assertHasLabel(final Object element, final String label) { - Assert.assertTrue("Element '" + element.toString() + "' must exist.", getLabelMap().containsKey(element)); - Assert.assertTrue("Element '" + element.toString() + "' must have label '" + label + "'. LabelMap contains: " + Assertions.assertTrue("Element '" + element.toString() + "' must exist.", getLabelMap().containsKey(element)); + Assertions.assertTrue("Element '" + element.toString() + "' must have label '" + label + "'. LabelMap contains: " + getLabelMap().get(element), getLabelMap().get(element).contains(label)); } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java index 097bf9029..c640c9888 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.ui.occurrences; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertSame; import java.util.Set; @@ -28,12 +28,12 @@ import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.xtext.ui.editor.occurrences.Messages; -import org.junit.After; -import org.junit.Before; +import org.junit.jupiter.api.AfterEach; import com.avaloq.tools.ddk.test.core.util.JobChangeListener; import com.avaloq.tools.ddk.xtext.test.ui.AbstractXtextUiTest; import com.google.common.collect.Sets; +import org.junit.jupiter.api.BeforeEach; /** @@ -157,7 +157,7 @@ protected void addKernelSourceToWorkspace(final String sourceFileName, final Cha /** * Sets up the {@link JobChangeListener}. */ - @Before + @BeforeEach public void setUpJobListener() { Job.getJobManager().addJobChangeListener(jobChangeListener); } @@ -165,7 +165,7 @@ public void setUpJobListener() { /** * Tears down the {@link JobChangeListener}. */ - @After + @AfterEach public void tearDownJobListener() { Job.getJobManager().removeJobChangeListener(jobChangeListener); jobChangeListener.reset(); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineTest.java index b95f2a98a..cdd906aa9 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineTest.java @@ -27,8 +27,8 @@ import org.eclipse.xtext.ui.editor.outline.impl.EObjectNode; import org.eclipse.xtext.ui.editor.outline.impl.EStructuralFeatureNode; import org.eclipse.xtext.util.concurrent.IUnitOfWork; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.test.ui.AbstractXtextEditorTest; import com.google.common.base.Predicate; @@ -54,7 +54,7 @@ protected List getExpectedElements() { * Tests that the outline of the default test resource contains exactly the expected elements. */ @Test - public void testOutline() { + void testOutline() { if (getExpectedElements() == null) { return; // TODO: remove this once all tests have been refactored } @@ -101,8 +101,8 @@ protected void assertHasOutlineNode(final Object object) { if (object instanceof EClass) { key = ((EClass) object).getInstanceClass(); } - Assert.assertTrue("Outline must contain element '" + object.toString() + "'.", getOutlineMap().containsKey(key)); - Assert.assertFalse("Outline must contain element '" + object.toString() + "'.", getOutlineMap().get(key).isEmpty()); + Assertions.assertTrue("Outline must contain element '" + object.toString() + "'.", getOutlineMap().containsKey(key)); + Assertions.assertFalse("Outline must contain element '" + object.toString() + "'.", getOutlineMap().get(key).isEmpty()); } /** @@ -128,7 +128,7 @@ protected IOutlineNode assertHasOutlineNode(final String nodeName) { protected IOutlineNode assertHasOutlineNode(final String nodeName, final String nodeType) { IOutlineTreeProvider provider = getXtextTestUtil().get(IOutlineTreeProvider.class); IOutlineNode field = findNode(provider.createRoot(getDocument()), nodeName, nodeType); - Assert.assertNotNull("Outline must contain element '" + nodeName + "'.", field); + Assertions.assertNotNull("Outline must contain element '" + nodeName + "'.", field); return field; } @@ -145,7 +145,7 @@ protected IOutlineNode assertHasOutlineNode(final String nodeName, final String protected void assertHasOutlineNode(final String nodeName, final String nodeType, final String parentName) { IOutlineNode field = assertHasOutlineNode(nodeName, nodeType); IOutlineNode parent = field.getParent(); - Assert.assertEquals("The element '" + nodeName + "' doesn't belong to the '" + parentName + "' group.", parentName, parent.getText().toString()); + Assertions.assertEquals("The element '" + nodeName + "' doesn't belong to the '" + parentName + "' group.", parentName, parent.getText().toString()); } /** @@ -201,9 +201,9 @@ public T exec(final EObject state) throws Exception { // NOPMD })); } try { - Assert.assertNotNull(NLS.bind("At least one outline node represents an object of type \"{0}\"", clazz.getName()), Iterables.find(result, predicate)); + Assertions.assertNotNull(NLS.bind("At least one outline node represents an object of type \"{0}\"", clazz.getName()), Iterables.find(result, predicate)); } catch (NoSuchElementException e) { - Assert.fail(NLS.bind("Could not find an object of type \"{0}\" in outline", clazz.getName())); + Assertions.fail(NLS.bind("Could not find an object of type \"{0}\" in outline", clazz.getName())); } } @@ -218,7 +218,7 @@ protected void assertOutlineNodeTreeConsistsOf(final Object... classes) { outlineMapKeySet.removeAll(Arrays.asList(classes)); // assert that only EStructuralFeatures remain for (Object object : outlineMapKeySet) { - Assert.assertTrue("All remaining objects in outlineMap must be of type EStructuralFeature. Found: " + object, object instanceof EStructuralFeature); + Assertions.assertTrue("All remaining objects in outlineMap must be of type EStructuralFeature. Found: " + object, object instanceof EStructuralFeature); } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineViewTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineViewTest.java index 898845011..01c02bbe7 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineViewTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/outline/AbstractOutlineViewTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.ui.outline; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/quickfix/AbstractQuickFixTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/quickfix/AbstractQuickFixTest.java index 67c11897d..7ab261a36 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/quickfix/AbstractQuickFixTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/quickfix/AbstractQuickFixTest.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.ui.quickfix; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; import java.util.List; @@ -23,7 +23,7 @@ import org.eclipse.xtext.validation.Issue; import org.hamcrest.MatcherAssert; import org.hamcrest.text.IsEqualCompressingWhiteSpace; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.check.runtime.quickfix.ICoreModificationContext; import com.avaloq.tools.ddk.check.runtime.ui.quickfix.CoreIssueModificationContext; @@ -89,7 +89,7 @@ protected void afterEachTest() { * the code of the expected issue, may be {@code null} */ protected void assertHasIssue(final String issueCode) { - Assert.assertFalse("Issue " + issueCode + " is empty", issuesWith(issueCode).isEmpty()); + Assertions.assertFalse("Issue " + issueCode + " is empty", issuesWith(issueCode).isEmpty()); } /** @@ -99,7 +99,7 @@ protected void assertHasIssue(final String issueCode) { * the code of the issue for which a quickfix is expected to exist, may be {@code null} */ protected void assertHasQuickFix(final String issueCode) { - Assert.assertFalse("No resolutions found for issue " + issueCode, resolutionsFor(issueCode).isEmpty()); + Assertions.assertFalse("No resolutions found for issue " + issueCode, resolutionsFor(issueCode).isEmpty()); } /** @@ -111,7 +111,7 @@ protected void assertHasQuickFix(final String issueCode) { * the label of the quickfix, may be {@code null} */ protected void assertHasQuickFix(final String issueCode, final String quickfixLabel) { - Assert.assertFalse("No resolutions found for issue " + issueCode, resolutionsFor(issueCode, quickfixLabel).isEmpty()); + Assertions.assertFalse("No resolutions found for issue " + issueCode, resolutionsFor(issueCode, quickfixLabel).isEmpty()); } /** @@ -125,7 +125,7 @@ protected void assertHasQuickFix(final String issueCode, final String quickfixLa * the number of expected quickfix proposal, must not be {@code null} */ protected void assertHasQuickFix(final String issueCode, final String quickfixLabel, final int numberOfQuickfixProposal) { - Assert.assertEquals("Number of resolutions found for issue " + issueCode + Assertions.assertEquals("Number of resolutions found for issue " + issueCode + " does not match the expected number of quickfix proposal", resolutionsFor(issueCode, quickfixLabel).size(), numberOfQuickfixProposal); } @@ -159,7 +159,7 @@ protected void assertNoQuickFix(final String sourceFileName, final String source createTestSource(sourceFileName, sourceFileContent); openEditor(sourceFileName); try { - Assert.assertTrue("No resolutions expected for issue " + issueCode + " on source " + sourceFileName, resolutionsFor(issueCode, quickfixLabel).isEmpty()); + Assertions.assertTrue("No resolutions expected for issue " + issueCode + " on source " + sourceFileName, resolutionsFor(issueCode, quickfixLabel).isEmpty()); } finally { closeEditor(getEditor(), false); } @@ -193,7 +193,7 @@ public void run() { }); } waitForValidation(); - Assert.assertTrue("Resolutions for issue " + issueCode + " with quickfix " + quickfixLabel + Assertions.assertTrue("Resolutions for issue " + issueCode + " with quickfix " + quickfixLabel + "are not empty", resolutionsFor(issueCode, quickfixLabel).isEmpty()); } @@ -234,7 +234,7 @@ public Integer apply(final IssueResolution from) { * Assert that the test source has no syntax error. */ protected void assertNoSyntaxError() { - Assert.assertFalse("The source has syntax errors", Iterables.any(getTestSource().getXtextResource().getErrors(), Predicates.instanceOf(XtextSyntaxDiagnostic.class))); + Assertions.assertFalse("The source has syntax errors", Iterables.any(getTestSource().getXtextResource().getErrors(), Predicates.instanceOf(XtextSyntaxDiagnostic.class))); } /** @@ -353,7 +353,7 @@ private void assertQuickFixExistsAndSuccessful(final String issueCode, final Str private void assertQuickFixExistsAndSuccessful(final String issueCode, final String quickfixLabel, final String expectedContent, final boolean ignoreFormatting) { // Assert amount of quickfixes int resolutionCount = resolutionsFor(issueCode, quickfixLabel).size(); - Assert.assertEquals(String.format("There must be exactly one quickfix with label '%s' for issue '%s', but found '%d'.", quickfixLabel, issueCode, resolutionCount), resolutionCount, 1); + Assertions.assertEquals(String.format("There must be exactly one quickfix with label '%s' for issue '%s', but found '%d'.", quickfixLabel, issueCode, resolutionCount), resolutionCount, 1); // Apply quickfix UiThreadDispatcher.dispatchAndWait(new Runnable() { @Override @@ -365,7 +365,7 @@ public void run() { } }); waitForValidation(); - Assert.assertTrue("Resolutions for issue " + issueCode + " with quickfix " + quickfixLabel + Assertions.assertTrue("Resolutions for issue " + issueCode + " with quickfix " + quickfixLabel + "are not empty", resolutionsFor(issueCode, quickfixLabel).isEmpty()); String actualContent = getDocument().get(); assertQuickFixProducesExpectedOutput(expectedContent, actualContent, ignoreFormatting); @@ -386,7 +386,7 @@ private void assertQuickFixProducesExpectedOutput(final String expectedContent, String expected = expectedContent.replaceAll(CR_LF, LF); String actual = actualContent.replaceAll(CR_LF, LF); if (ignoreFormatting) { - MatcherAssert.assertThat(message, actual, IsEqualCompressingWhiteSpace.equalToCompressingWhiteSpace(expected)); + MatcherAssertions.assertThat(message, actual, IsEqualCompressingWhiteSpace.equalToCompressingWhiteSpace(expected)); } else { assertEquals(message, expected, actual); } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidValidationTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidValidationTest.java index ffddb3abb..a49f460fa 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidValidationTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.test.validation; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.fail; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.testing.validation.AssertableDiagnostics.Pred; diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java index abb767b6e..ca885c1af 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java @@ -11,11 +11,11 @@ package com.avaloq.tools.ddk.xtext.test.validation; import static org.eclipse.xtext.validation.ValidationMessageAcceptor.INSIGNIFICANT_INDEX; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Arrays; import java.util.List; diff --git a/com.avaloq.tools.ddk.xtext.test/.classpath b/com.avaloq.tools.ddk.xtext.test/.classpath index ed271aa37..1054ffe60 100644 --- a/com.avaloq.tools.ddk.xtext.test/.classpath +++ b/com.avaloq.tools.ddk.xtext.test/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.test/AllTests DDK.launch b/com.avaloq.tools.ddk.xtext.test/AllTests DDK.launch index 4e32526a5..8caf78ec1 100644 --- a/com.avaloq.tools.ddk.xtext.test/AllTests DDK.launch +++ b/com.avaloq.tools.ddk.xtext.test/AllTests DDK.launch @@ -26,7 +26,7 @@ - + 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 92052c388..f29bbb72e 100644 --- a/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext, com.avaloq.tools.ddk.xtext.test.core, @@ -19,7 +19,7 @@ Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.emf.ecore, org.eclipse.emf.common, org.antlr.runtime, - org.junit, + org.junit.jupiter.api, com.avaloq.tools.ddk.xtext.builder, org.eclipse.xtext.builder, org.mockito, diff --git a/com.avaloq.tools.ddk.xtext.test/pom.xml b/com.avaloq.tools.ddk.xtext.test/pom.xml index ecb286631..0b6ae57c1 100644 --- a/com.avaloq.tools.ddk.xtext.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent 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 21f8b1f11..3ceab654b 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 @@ -25,8 +25,8 @@ import org.eclipse.xtext.builder.impl.BuildScheduler; import org.eclipse.xtext.builder.impl.IBuildFlag; import org.eclipse.xtext.testing.AbstractXtextTests; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatchers; import com.avaloq.tools.ddk.xtext.builder.layered.XtextBuildTrigger; @@ -40,7 +40,7 @@ public class XtextBuildTriggerTest extends AbstractXtextTests { private BuildScheduler scheduler; @Override - @Before + @BeforeEach public void setUp() throws Exception { super.setUp(); workspace = mock(IWorkspace.class); @@ -55,7 +55,7 @@ protected void configure() { } @Test - public void testTriggerRespectsAutoBuilding() { + void testTriggerRespectsAutoBuilding() { XtextBuildTrigger buildTrigger = get(XtextBuildTrigger.class); // auto-build disabled diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/AbstractFormatterTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/AbstractFormatterTest.java index 39407153a..689ff5f5b 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/AbstractFormatterTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/AbstractFormatterTest.java @@ -19,7 +19,7 @@ import org.eclipse.xtext.nodemodel.util.NodeModelUtils; import org.eclipse.xtext.resource.SaveOptions; import org.eclipse.xtext.serializer.ISerializer; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTest; @@ -54,13 +54,13 @@ protected ISerializer getSerializer() { protected void assertFormattedPTC(final String expected, final String model) throws IOException { EObject m = getModel(model); String res = getSerializer().serialize(m, SaveOptions.newBuilder().format().getOptions()); - Assert.assertEquals("Serialization not equal", expected, res); + Assertions.assertEquals("Serialization not equal", expected, res); } protected void assertPreserved(final String model) throws IOException { EObject m = getModel(model); String res = getSerializer().serialize(m, SaveOptions.newBuilder().getOptions()); - Assert.assertEquals("Preserved node model", model, res); + Assertions.assertEquals("Preserved node model", model, res); } // test formatting based on the NodeModel @@ -68,7 +68,7 @@ protected void assertFormattedNM(final String expected, final String model, fina ICompositeNode node = NodeModelUtils.getNode(getModel(model)).getRootNode(); IFormattedRegion r = getXtextTestUtil().get(INodeModelFormatter.class).format(node, offset, length); String actual = model.substring(0, r.getOffset()) + r.getFormattedText() + model.substring(r.getLength() + r.getOffset()); - Assert.assertEquals("Formatting based on the NodeModel", expected, actual); + Assertions.assertEquals("Formatting based on the NodeModel", expected, actual); } } diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTest.java index 473afeeb7..eec24d611 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTest.java @@ -13,9 +13,9 @@ import java.io.IOException; import org.eclipse.xtext.resource.SaveOptions; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.formatter.formatterTestLanguage.Decl; import com.avaloq.tools.ddk.xtext.formatter.formatterTestLanguage.FormatterTestLanguageFactory; @@ -47,8 +47,8 @@ protected String getTestSourceFileName() { * * @throws IOException */ - @Test - public void linewrap() throws IOException { + @org.junit.jupiter.api.Test + void linewrap() throws IOException { String model = "test linewrap float val; int x; double y;"; String expected = "test linewrap\nfloat val;\nint x;\ndouble y;"; assertFormattedPTC(expected, model); @@ -62,8 +62,8 @@ public void linewrap() throws IOException { * * @throws IOException */ - @Test - public void keepComments() throws IOException { + @org.junit.jupiter.api.Test + void keepComments() throws IOException { // String model = "test linewrap float val; int x; double y;"; String model = "// begincomment \ntest linewrap// comment1\n" + "float val;//comment2\n" + "int x;" + "double y; //yoyoyo!\n// endcomment."; final String exp = "// begincomment \ntest linewrap// comment1\n" + "float val;//comment2\n" + "int x;\n" + "double y; //yoyoyo!\n// endcomment."; @@ -77,8 +77,8 @@ public void keepComments() throws IOException { * * @throws IOException */ - @Test - public void column() throws IOException { + @org.junit.jupiter.api.Test + void column() throws IOException { String model = "test column item int x;"; String expected = "test\n column\n\titem int x;"; assertFormattedPTC(expected, model); @@ -93,7 +93,7 @@ public void column() throws IOException { * @throws IOException */ @Test - public void columnMinimumPadding() throws IOException { + void columnMinimumPadding() throws IOException { String model = " test column name item int x;"; String expected = "test\n column name\n\n\titem int x;"; assertFormattedPTC(expected, model); @@ -107,7 +107,7 @@ public void columnMinimumPadding() throws IOException { * @throws IOException */ @Test - public void offset() throws IOException { + void offset() throws IOException { String model = "test offset value v pair p1 p2"; String expected = "test\noffset\n\tvalue v\n\t\tpair p1 p2"; assertFormattedPTC(expected, model); @@ -121,7 +121,7 @@ public void offset() throws IOException { * @throws IOException */ @Test - public void rightPadding() throws IOException { + void rightPadding() throws IOException { String model = "test padding long_name n2;"; String expected = "test\npadding long_name n2 ;"; assertFormattedPTC(expected, model); @@ -135,8 +135,8 @@ public void rightPadding() throws IOException { * * @throws IOException */ - @Test - public void indentation() throws IOException { + @org.junit.jupiter.api.Test + void indentation() throws IOException { String model = "test indentation { float val; double y; indentation { int x; } }"; String expected = "test indentation {\n float val;\n double y;\n indentation {\n int x;\n }\n}"; assertFormattedPTC(expected, model); @@ -150,8 +150,8 @@ public void indentation() throws IOException { * * @throws IOException */ - @Test - public void association() throws IOException { + @org.junit.jupiter.api.Test + void association() throws IOException { String model = "test indentation { var = [0,1,2,3,4]; }"; String expected = "test indentation {\n var=[ 0, 1, 2, 3, 4 ];\n}"; assertFormattedPTC(expected, model); @@ -166,7 +166,7 @@ public void association() throws IOException { * @throws IOException */ @Test - public void indentationAndComments() throws IOException { + void indentationAndComments() throws IOException { String model = "test /* xxx */ indentation { float val; // some float\n double /* oo */ y; indentation { // some block\n int x; // xxx\n } } // final comment"; String expected = "test /* xxx */ indentation {\n float val; // some float\n double /* oo */ y;\n indentation { // some block\n int x; // xxx\n }\n} // final comment"; assertFormattedPTC(expected, model); @@ -182,7 +182,7 @@ public void indentationAndComments() throws IOException { * @throws IOException */ @Test - public void indentationAndLineWrap() throws IOException { + void indentationAndLineWrap() throws IOException { String model = "test indentation { void func(x:int,y:int,s:javalangString, foo:javasqlDate, blupp:mylongtype, msads:adshdjkhsakdasdkslajdlsask, x:x, a:b, c:d ); }"; String expected = "test indentation {\n void func(x:int,y:int,\n\t\ts:javalangString,\n\t\tfoo:javasqlDate,\n\t\tblupp:mylongtype,\n\t\tmsads:adshdjkhsakdasdkslajdlsask,\n\t\tx:x,a:b,c:d);\n}"; assertFormattedPTC(expected, model); @@ -196,8 +196,8 @@ public void indentationAndLineWrap() throws IOException { * * @throws IOException */ - @Test - public void between1() throws IOException { + @org.junit.jupiter.api.Test + void between1() throws IOException { String model = "test indentation { indentation { x x; }; }"; String expected = "test indentation {\n indentation {\n x x;\n };\n}"; assertFormattedPTC(expected, model); @@ -212,7 +212,7 @@ public void between1() throws IOException { * @throws IOException */ @Test - public void between2() throws IOException { + void between2() throws IOException { String model = "test indentation { indentation { x x; } }"; String expected = "test indentation {\n indentation {\n x x;\n }\n}"; assertFormattedPTC(expected, model); @@ -226,8 +226,8 @@ public void between2() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRule() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRule() throws IOException { String model = "test linewrap fqn ab; fqn xx.yy.zz;"; String expected = "test linewrap\nfqn\nab;\nfqn\nxx.yy.zz;"; assertFormattedPTC(expected, model); @@ -241,8 +241,8 @@ public void linewrapDatatypeRule() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRulePartial1() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRulePartial1() throws IOException { String model = "test linewrap fqn ab . xx .yy .zz;"; String expected = "test linewrap fqn ab.xx.yy.zz;"; assertFormattedNM(expected, model, 22, 2); @@ -254,8 +254,8 @@ public void linewrapDatatypeRulePartial1() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRulePartial2() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRulePartial2() throws IOException { String model = "test linewrap fqn ab . xx .yy .zz;fqn xxx;"; String expected = "test linewrap fqn\nab.xx.yy.zz;fqn xxx;"; assertFormattedNM(expected, model, 15, 10); @@ -267,8 +267,8 @@ public void linewrapDatatypeRulePartial2() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRulePartial3() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRulePartial3() throws IOException { String model = "test linewrap fqn ab . xx .yy .zz;fqn xxx;"; String expected = "test linewrap fqn ab.xx.yy.zz;\nfqn xxx;"; assertFormattedNM(expected, model, 25, 12); @@ -281,7 +281,7 @@ public void linewrapDatatypeRulePartial3() throws IOException { * @throws IOException */ @Test - public void formatSegment1() throws IOException { + void formatSegment1() throws IOException { String model = "test\nindentation {\n indentation { x x ; } }"; String expected = "test\nindentation {\n indentation {\n x x;\n } }"; assertFormattedNM(expected, model, 30, 18); @@ -294,7 +294,7 @@ public void formatSegment1() throws IOException { * @throws IOException */ @Test - public void formatSegment2() throws IOException { + void formatSegment2() throws IOException { String model = "test indentation {\n indentation { x x ; } }"; // String expected = // "test\nindentation {\n indentation {\n x x;\n } }"; @@ -308,7 +308,7 @@ public void formatSegment2() throws IOException { * @throws IOException */ @Test - public void formatSegment3() throws IOException { + void formatSegment3() throws IOException { String model = " test indentation {\n indentation { x x ; } }"; String expected = "test indentation {\n indentation {\n x x;\n }\n}"; assertFormattedNM(expected, model, 0, model.length()); @@ -320,8 +320,8 @@ public void formatSegment3() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRuleRef1() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRuleRef1() throws IOException { String model = "test linewrap fqn ab .cd .ef; fqnref ab. cd. ef;"; String expected = "test linewrap\nfqn\nab.cd.ef;\nfqnref\nab.cd.ef;"; // assertFormattedPTC(expected, model); @@ -335,7 +335,7 @@ public void linewrapDatatypeRuleRef1() throws IOException { * @throws IOException */ @Test - public void linewrapDatatypeRuleRef2() throws IOException { + void linewrapDatatypeRuleRef2() throws IOException { String model = "test linewrap fqn ab.cd.ef; fqnref ab.cd.ef;"; String expected = "test linewrap\nfqn\nab.cd.ef;\nfqnref\nab.cd.ef;"; assertFormattedPTC(expected, model); @@ -350,8 +350,8 @@ public void linewrapDatatypeRuleRef2() throws IOException { * * @throws IOException */ - @Test - public void linewrapDatatypeRuleComments() throws IOException { + @org.junit.jupiter.api.Test + void linewrapDatatypeRuleComments() throws IOException { String model = "test linewrap/* 1 */fqn/* 2 */ab.cd.ef/* 3 */;/* 4 */fqnref/* 5 */ab.cd.ef/* 6 */;/* 7 */"; // The expected model string differs from Xtext's - // Xtext does not expect a line wrap after the keyword "linewrap" @@ -370,7 +370,7 @@ public void linewrapDatatypeRuleComments() throws IOException { * @throws IOException */ @Test - public void enumeration() throws IOException { + void enumeration() throws IOException { String model = "test linewrap enum lit1,lit2,lit3,lit1;"; String expected = "test linewrap\nenum lit1 ,\nlit2,\nlit3,\nlit1;"; assertFormattedPTC(expected, model); @@ -386,7 +386,7 @@ public void enumeration() throws IOException { */ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=312559 @Test - public void suppressedWhitespace() throws IOException { + void suppressedWhitespace() throws IOException { String model = "test linewrap `f%%a` post;"; String expected = "test linewrap\n`f%< b >%a` post;"; assertFormattedPTC(expected, model); @@ -402,7 +402,7 @@ public void suppressedWhitespace() throws IOException { */ // TODO: investigate whether to include test or not - currently this test // would fail - @Ignore + @Disabled public void suppressedLinewrap() throws IOException { String model = "test linewrap\n`foo%abcd%foo%< b\n>%abcd%foo%abcd%foo%abcd%" + "foo%abcd%foo%abcd%foo%abcd%foo%abcd%foo%abcd%foo%xx%foo%abcd%foo%abcd%" + "foo%abcd%foo%<\nb >%foo%abcd` post;"; @@ -417,8 +417,8 @@ public void suppressedLinewrap() throws IOException { * * @throws IOException */ - @Test - public void linewrapMin() throws IOException { + @org.junit.jupiter.api.Test + void linewrapMin() throws IOException { String model = "test wrapminmax foo bar;"; String expected = "test wrapminmax\n\nfoo bar;"; assertFormattedPTC(expected, model); @@ -433,7 +433,7 @@ public void linewrapMin() throws IOException { * @throws IOException */ @Test - public void linewrapMax() throws IOException { + void linewrapMax() throws IOException { String model = "test wrapminmax\n\n\n\n\n\n\n\n\n\n\n\n\nfoo bar;"; String expected = "test wrapminmax\n\n\n\n\nfoo bar;"; assertFormattedPTC(expected, model); @@ -447,8 +447,8 @@ public void linewrapMax() throws IOException { * * @throws IOException */ - @Test - public void linewrapKeep() throws IOException { + @org.junit.jupiter.api.Test + void linewrapKeep() throws IOException { String model = "test wrapminmax\n\n\n\nfoo bar;"; assertFormattedPTC(model, model); assertFormattedNM(model, model, 0, model.length()); @@ -461,8 +461,8 @@ public void linewrapKeep() throws IOException { * * @throws IOException */ - @Test - public void linewrapDefault() { + @org.junit.jupiter.api.Test + void linewrapDefault() { FormatterTestLanguageFactory f = FormatterTestLanguageFactory.eINSTANCE; TestLinewrapMinMax m = f.createTestLinewrapMinMax(); Decl d = f.createDecl(); @@ -471,7 +471,7 @@ public void linewrapDefault() { m.getItems().add(d); String actual = getSerializer().serialize(m, SaveOptions.newBuilder().format().getOptions()); String expected = "test wrapminmax\n\n\nxxx yyy;"; - Assert.assertEquals("Default Linewrap", expected, actual); + Assertions.assertEquals("Default Linewrap", expected, actual); } /** @@ -480,8 +480,8 @@ public void linewrapDefault() { * * @throws IOException */ - @Test - public void space() throws IOException { + @org.junit.jupiter.api.Test + void space() throws IOException { String model = "test linewrap space foo;"; String expected = "test linewrap\nspace foo;"; assertFormattedPTC(expected, model); @@ -496,7 +496,7 @@ public void space() throws IOException { * @throws IOException */ @Test - public void datatypeRules() throws IOException { + void datatypeRules() throws IOException { String model = "test linewrap datatypes abc kw1 bcd def kw3;"; String expected = "test linewrap\ndatatypes abc\nkw1\nbcd\ndef\nkw3;"; assertFormattedPTC(expected, model); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProviderTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProviderTest.java index 80d605e0f..cca1883d4 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProviderTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProviderTest.java @@ -11,8 +11,8 @@ package com.avaloq.tools.ddk.xtext.linking; import org.eclipse.emf.ecore.EObject; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; /** @@ -52,23 +52,23 @@ public String unescape(final String text) { private final TestAbstractFragmentProvider fragmentProvider = new TestAbstractFragmentProvider(); @Test - public void testEscape() { + void testEscape() { StringBuilder builder = new StringBuilder(); fragmentProvider.appendEscaped("foo/bar#\\", builder); - Assert.assertEquals("Fragment not properly scaped", builder.toString(), "foo\\/bar#\\\\"); + Assertions.assertEquals("Fragment not properly scaped", builder.toString(), "foo\\/bar#\\\\"); } @Test - public void testUnescape() { - Assert.assertEquals("Fragment not properly unscaped", "foo//bar##\\", fragmentProvider.unescape("foo\\/\\/bar##\\\\")); + void testUnescape() { + Assertions.assertEquals("Fragment not properly unscaped", "foo//bar##\\", fragmentProvider.unescape("foo\\/\\/bar##\\\\")); } - @Test - public void testUnescapeEscape() { + @org.junit.jupiter.api.Test + void testUnescapeEscape() { for (String text : SPECIAL_ESCAPE_CASES) { StringBuilder builder = new StringBuilder(); fragmentProvider.appendEscaped(text, builder); - Assert.assertEquals("Escaped Characters must be equal", text, fragmentProvider.unescape(builder.toString())); + Assertions.assertEquals("Escaped Characters must be equal", text, fragmentProvider.unescape(builder.toString())); } } diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/ShortFragmentProviderTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/ShortFragmentProviderTest.java index b6fa89923..af23d7623 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/ShortFragmentProviderTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/linking/ShortFragmentProviderTest.java @@ -18,14 +18,15 @@ import org.eclipse.emf.ecore.resource.impl.ResourceImpl; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.xtext.resource.IFragmentProvider; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.test.core.BugTest; import com.avaloq.tools.ddk.xtext.test.AbstractTest; import com.avaloq.tools.ddk.xtext.test.AbstractTestUtil; +import org.junit.jupiter.api.BeforeEach; /** @@ -58,7 +59,7 @@ public EObject getEObject(final String fragment) { private EReference testReference; private EReference testReference2; - @Before + @BeforeEach public void initialize() { EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE; @@ -80,7 +81,7 @@ public void initialize() { EPackage.Registry.INSTANCE.put(testPackage.getNsURI(), testPackage); } - @After + @AfterEach public void cleanup() { EPackage.Registry.INSTANCE.remove(testPackage.getNsURI()); } @@ -100,13 +101,13 @@ public void testLongFragment() { resource.getContents().add(root); String fragment = fragmentProvider.getFragment(parent, fragmentFallback); - Assert.assertEquals(FRAGMENT_MUST_BE_EQUAL, "/0*" + (reps + 1), fragment); + Assertions.assertEquals(FRAGMENT_MUST_BE_EQUAL, "/0*" + (reps + 1), fragment); - Assert.assertEquals(FRAGMENT_MUST_BE_EQUAL, parent, fragmentProvider.getEObject(resource, fragment, fragmentFallback)); + Assertions.assertEquals(FRAGMENT_MUST_BE_EQUAL, parent, fragmentProvider.getEObject(resource, fragment, fragmentFallback)); } - @Test - public void testLongFragment2() { + @org.junit.jupiter.api.Test + void testLongFragment2() { int reps = 10; EObject root = EcoreUtil.create(testClass); EObject parent = root; @@ -124,9 +125,9 @@ public void testLongFragment2() { resource.getContents().add(root); String fragment = fragmentProvider.getFragment(parent, fragmentFallback); - Assert.assertEquals(FRAGMENT_MUST_BE_EQUAL, "/0*" + (reps + 1) + "/1", fragment); + Assertions.assertEquals(FRAGMENT_MUST_BE_EQUAL, "/0*" + (reps + 1) + "/1", fragment); - Assert.assertEquals(FRAGMENT_MUST_BE_EQUAL, parent, fragmentProvider.getEObject(resource, fragment, fragmentFallback)); + Assertions.assertEquals(FRAGMENT_MUST_BE_EQUAL, parent, fragmentProvider.getEObject(resource, fragment, fragmentFallback)); } @Override diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNamePatternTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNamePatternTest.java index 365a3b6d0..6e03406d8 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNamePatternTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNamePatternTest.java @@ -10,14 +10,14 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.naming; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Comparator; import org.eclipse.xtext.naming.QualifiedName; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.test.core.BugTest; @@ -30,7 +30,7 @@ public class QualifiedNamePatternTest { @Test - public void testSimpleQualifiedNamePattern() { + void testSimpleQualifiedNamePattern() { QualifiedNamePattern pattern = QualifiedNamePattern.create("foo*"); assertEquals(QualifiedName.create("foo"), pattern.lowerInclusive()); assertEquals(QualifiedName.create("fop"), pattern.upperExclusive()); @@ -39,8 +39,8 @@ public void testSimpleQualifiedNamePattern() { assertNoMatch(pattern, "foo", "bar"); } - @Test - public void testQualifiedPrefixNamePattern() { + @org.junit.jupiter.api.Test + void testQualifiedPrefixNamePattern() { QualifiedNamePattern pattern = QualifiedNamePattern.create("foo", "*"); assertEquals(QualifiedName.create("foo", ""), pattern.lowerInclusive()); assertEquals(QualifiedName.create("foo!"), pattern.upperExclusive()); @@ -53,8 +53,8 @@ public void testQualifiedPrefixNamePattern() { assertEquals(QualifiedName.create("foo", "bas"), pattern.upperExclusive()); } - @Test - public void testRecursiveWildcardPattern() { + @org.junit.jupiter.api.Test + void testRecursiveWildcardPattern() { QualifiedNamePattern pattern = QualifiedNamePattern.create("foo", "**"); assertEquals(QualifiedName.create("foo", ""), pattern.lowerInclusive()); assertEquals(QualifiedName.create("foo!"), pattern.upperExclusive()); @@ -63,8 +63,8 @@ public void testRecursiveWildcardPattern() { assertNoMatch(pattern, "foo2", "bar"); } - @Test - public void testRecursiveWildcardPatternWithPrefix() { + @org.junit.jupiter.api.Test + void testRecursiveWildcardPatternWithPrefix() { QualifiedNamePattern pattern = QualifiedNamePattern.create("foo", "b**"); assertEquals(QualifiedName.create("foo", "b"), pattern.lowerInclusive()); assertEquals(QualifiedName.create("foo", "c"), pattern.upperExclusive()); @@ -78,32 +78,32 @@ public void testRecursiveWildcardPatternError() { QualifiedNamePattern.create("foo", "bar**baz"); } - @Test(expected = IllegalArgumentException.class) + @org.junit.jupiter.api.Test(expected = IllegalArgumentException.class) public void testRecursiveWildcardPatternError2() { QualifiedNamePattern.create("foo", "**", "bar"); } - @Test(expected = IllegalArgumentException.class) + @org.junit.jupiter.api.Test(expected = IllegalArgumentException.class) public void testRecursiveWildcardPatternError3() { QualifiedNamePattern.create("foo*bar"); } - @Test - public void testAllPattern() { + @org.junit.jupiter.api.Test + void testAllPattern() { QualifiedNamePattern pattern = QualifiedNamePattern.create("*"); assertEquals(QualifiedName.create(""), pattern.lowerInclusive()); assertEquals(QualifiedName.create("!"), pattern.upperExclusive()); } - @Test - public void testPatternWithoutWildcard() { + @org.junit.jupiter.api.Test + void testPatternWithoutWildcard() { QualifiedNamePattern pattern = QualifiedNamePattern.create("foo"); assertEquals(QualifiedName.create("foo"), pattern.lowerInclusive()); assertEquals(QualifiedName.create("foo!"), pattern.upperExclusive()); } @Test - public void testRegexpPatterns() { + void testRegexpPatterns() { QualifiedNamePattern pattern = QualifiedNamePattern.createFromGlobs("*"); assertEquals(QualifiedName.create(""), pattern.lowerInclusive()); assertEquals(QualifiedName.create("!"), pattern.upperExclusive()); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookupTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookupTest.java index 05968c87f..dc8f6158e 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookupTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookupTest.java @@ -10,17 +10,17 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.naming; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Collection; import java.util.Collections; import org.eclipse.emf.common.util.URI; import org.eclipse.xtext.naming.QualifiedName; -import org.junit.Test; import com.google.common.collect.ImmutableSet; +import org.junit.jupiter.api.Test; @SuppressWarnings({"nls", "unused", "PMD.JUnitAssertionsShouldIncludeMessage"}) @@ -30,12 +30,12 @@ public class QualifiedNameSegmentTreeLookupTest { private final QualifiedNameSegmentTreeLookup lookup = new QualifiedNameSegmentTreeLookup(URI.class, true); @Test - public void testEmpty() { + void testEmpty() { assertNull(lookup.get(QualifiedName.EMPTY)); } - @Test - public void testExact() { + @org.junit.jupiter.api.Test + void testExact() { QualifiedName name = name("foo"); Collection values = Collections.singletonList(uri(name)); lookup.putAll(name, values); @@ -53,7 +53,7 @@ public void testExact() { } @Test - public void testTopLevelPatternWithoutWildcard() { + void testTopLevelPatternWithoutWildcard() { URI value1 = put("foo"); URI value2 = put("bar"); URI value3 = put("foo2"); @@ -63,8 +63,8 @@ public void testTopLevelPatternWithoutWildcard() { assertContentEquals(ImmutableSet.of(value3), lookup.get(pattern("foo2"), false)); } - @Test - public void testTopLevelPatternWithWildcard() { + @org.junit.jupiter.api.Test + void testTopLevelPatternWithWildcard() { URI value1 = put("foo"); URI value2 = put("foo2"); URI value3 = put("bar"); @@ -74,8 +74,8 @@ public void testTopLevelPatternWithWildcard() { assertContentEquals(ImmutableSet.of(value3), lookup.get(pattern("b*"), true)); } - @Test - public void testNestedPatternMatchesWithoutWildcard() { + @org.junit.jupiter.api.Test + void testNestedPatternMatchesWithoutWildcard() { URI value1 = put("foo"); URI value2 = put("foo.bar"); URI value3 = put("foo2"); @@ -85,8 +85,8 @@ public void testNestedPatternMatchesWithoutWildcard() { assertContentEquals(ImmutableSet.of(value3), lookup.get(pattern("foo2"), true)); } - @Test - public void testNestedPatternMatchesWithWildcard() { + @org.junit.jupiter.api.Test + void testNestedPatternMatchesWithWildcard() { URI value1 = put("foo"); URI value2 = put("foo.bar"); URI value3 = put("foo.baz"); @@ -99,8 +99,8 @@ public void testNestedPatternMatchesWithWildcard() { assertContentEquals(ImmutableSet.of(value2), lookup.get(pattern("foo.bar*"), true)); } - @Test - public void testNestedPatternMatchesWithRecursiveWildcard() { + @org.junit.jupiter.api.Test + void testNestedPatternMatchesWithRecursiveWildcard() { URI value1 = put("foo"); URI value2 = put("foo.bar"); URI value3 = put("foo.bar.baz"); @@ -112,8 +112,8 @@ public void testNestedPatternMatchesWithRecursiveWildcard() { assertContentEquals(ImmutableSet.of(value2, value3, value4), lookup.get(pattern("foo.b**"), true)); } - @Test - public void testUnmatchedNestedPattern() { + @org.junit.jupiter.api.Test + void testUnmatchedNestedPattern() { URI value1 = put("foo"); URI value2 = put("foo.bar"); URI value3 = put("foo.bar.baz"); @@ -131,8 +131,8 @@ public void testUnmatchedNestedPattern() { assertContentEquals(ImmutableSet.of(), lookup.get(pattern("foo.bar.bazz*"), true)); } - @Test - public void testOutOfOrderInsertion() { + @org.junit.jupiter.api.Test + void testOutOfOrderInsertion() { QualifiedName name1 = name("foo.bar"); Collection value1 = Collections.singletonList(uri(name1)); lookup.putAll(name1, value1); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/AbstractSelectorFragmentProviderTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/AbstractSelectorFragmentProviderTest.java index 1ac4353de..6a0bbb4f1 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/AbstractSelectorFragmentProviderTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/AbstractSelectorFragmentProviderTest.java @@ -24,8 +24,8 @@ import org.eclipse.xtext.testing.AbstractXtextTests; import org.eclipse.xtext.resource.IFragmentProvider; import org.eclipse.xtext.util.Modules2; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import com.google.inject.AbstractModule; @@ -38,7 +38,7 @@ public class AbstractSelectorFragmentProviderTest extends AbstractXtextTests { // CHECKSTYLE:ON - @Before + @BeforeEach @Override public void setUp() throws Exception { super.setUp(); @@ -50,26 +50,26 @@ protected void configure() { })); } - @Test - public void testTopLevelObject() throws Exception { + @org.junit.jupiter.api.Test + void testTopLevelObject() throws Exception { Grammar grammar = (Grammar) getModel("grammar foo.Foo\n" + "generate foo 'http://www.foo.com/foo'\n" + "Foo: 'foo';"); assertFragmentMatchesAndResolves(grammar.eResource(), "/0", grammar); } @Test - public void testMultiValuedContainment() throws Exception { + void testMultiValuedContainment() throws Exception { Grammar grammar = (Grammar) getModel("grammar foo.Foo\n" + "generate foo 'http://www.foo.com/foo'\n" + "Foo: 'foo';"); assertFragmentMatchesAndResolves(grammar.eResource(), "/0/5(0='Foo')#0", grammar.getRules().get(0)); } - @Test - public void testSingleValuedContainment() throws Exception { + @org.junit.jupiter.api.Test + void testSingleValuedContainment() throws Exception { Grammar grammar = (Grammar) getModel("grammar foo.Foo\n" + "generate foo 'http://www.foo.com/foo'\n" + "Foo: 'foo'+;"); assertFragmentMatchesAndResolves(grammar.eResource(), "/0/5(0='Foo')#0/2(3='foo')", grammar.getRules().get(0).getAlternatives()); } - @Test - public void testNullSelectorValue() throws Exception { + @org.junit.jupiter.api.Test + void testNullSelectorValue() throws Exception { Grammar grammar = (Grammar) getModel("grammar foo.Foo\n" + "generate foo 'http://www.foo.com/foo'\n" + "Foo: 'selectCardinality';"); assertFragmentMatchesAndResolves(grammar.eResource(), "/0/5(0='Foo')#0/2(0=null)", grammar.getRules().get(0).getAlternatives()); @@ -78,7 +78,7 @@ public void testNullSelectorValue() throws Exception { } @Test - public void testEscapedSelectorValue() throws Exception { + void testEscapedSelectorValue() throws Exception { Grammar grammar = (Grammar) getModel("grammar foo.Foo\n" + "generate foo 'http://www.foo.com/foo'\n" + "Foo: 'foo.bar#';"); assertFragmentMatchesAndResolves(grammar.eResource(), "/0/5(0='Foo')#0/2(3='foo.bar#')", grammar.getRules().get(0).getAlternatives()); } diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/BugAig1084.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/BugAig1084.java index ec472473e..b72d54975 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/BugAig1084.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/BugAig1084.java @@ -19,7 +19,7 @@ import org.eclipse.xtext.resource.IEObjectDescription; import org.eclipse.xtext.util.IResourceScopeCache; import org.eclipse.xtext.util.OnChangeEvictingCache; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.google.common.collect.Lists; @@ -31,7 +31,7 @@ public class BugAig1084 { * stack-overflow. */ @Test - public void recursiveLookUp() { + void recursiveLookUp() { Resource resource = org.mockito.Mockito.mock(Resource.class); EList emptyEList = new BasicEList(); org.mockito.Mockito.when(resource.eAdapters()).thenReturn(emptyEList); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDeltaTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDeltaTest.java index d0a53e225..990416a28 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDeltaTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDeltaTest.java @@ -10,10 +10,10 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.resource; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; @@ -26,18 +26,18 @@ import org.eclipse.xtext.resource.IReferenceDescription; import org.eclipse.xtext.resource.IResourceDescription; import org.eclipse.xtext.resource.impl.AbstractResourceDescription; -import org.junit.Test; import com.google.common.base.Function; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import org.junit.jupiter.api.Test; @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") public class ResourceDescriptionDeltaTest { - @Test - public void testGetAddedAndDeletedObjects() { + @org.junit.jupiter.api.Test + void testGetAddedAndDeletedObjects() { ResourceDescriptionDelta delta = new ResourceDescriptionDelta(createDescription("a"), createDescription("a"), null); assertDeltaEquals(0, 0, 0, delta); @@ -58,7 +58,7 @@ public void testGetAddedAndDeletedObjects() { } @Test - public void testGetChangedObjects() { + void testGetChangedObjects() { ResourceDescriptionDelta delta = new ResourceDescriptionDelta(createDescription("a:a"), createDescription("a:a1"), null); assertDeltaEquals(0, 1, 0, delta); @@ -70,19 +70,19 @@ public void testGetChangedObjects() { } @Test - public void testDeltaForNewResource() { + void testDeltaForNewResource() { ResourceDescriptionDelta delta = new ResourceDescriptionDelta(null, createDescription("a"), null); assertDeltaEquals(1, 0, 0, delta); } - @Test - public void testDeltaForDeletedResource() { + @org.junit.jupiter.api.Test + void testDeltaForDeletedResource() { ResourceDescriptionDelta delta = new ResourceDescriptionDelta(createDescription("a"), null, null); assertDeltaEquals(0, 0, 1, delta); } @Test - public void testOldReconstruction() { + void testOldReconstruction() { IResourceDescription oldRes = createDescription("a"); ResourceDescriptionDelta delta = new ResourceDescriptionDelta(oldRes, createDescription("a"), null); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/util/RuntimeProjectUtilTest.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/util/RuntimeProjectUtilTest.java index 48a565d55..9f1a0d4da 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/util/RuntimeProjectUtilTest.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/util/RuntimeProjectUtilTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package com.avaloq.tools.ddk.xtext.util; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.Assume.assumeNotNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -26,7 +26,7 @@ import org.eclipse.xtext.ui.resource.IStorage2UriMapper; import org.eclipse.xtext.ui.resource.Storage2UriMapperImpl; import org.eclipse.xtext.util.Pair; -import org.junit.Test; +import org.junit.jupiter.api.Test; import com.avaloq.tools.ddk.xtext.test.AbstractUtilTest; import com.avaloq.tools.ddk.xtext.test.AbstractXtextTestUtil; @@ -83,7 +83,7 @@ protected void beforeAllTests() { * Tests extracting project path from a {@link Resource}. */ @Test - public void getPathProjectTest() { + void getPathProjectTest() { assertEquals("Check if the correct project path has been returned", WORKSPACE_PATH + "/" + TEST_PROJECT_NAME, RuntimeProjectUtil.getPathProject(resource, mapperCorrect)); } @@ -92,7 +92,7 @@ public void getPathProjectTest() { * Tests extracting project name from a {@link URI}. */ @Test - public void getProjectCorrectTest() { + void getProjectCorrectTest() { super.addSourceToWorkspace(SOURCE_NAMES.get(0)); IProject iproject = RuntimeProjectUtil.getProject(uriCorrect, mapperCorrect); assumeNotNull(iproject); @@ -103,7 +103,7 @@ public void getProjectCorrectTest() { * Checks when passed {@link IStorage2UriMapper} is broken then null instead of project name expected. */ @Test - public void getProjectInCorrectTest() { + void getProjectInCorrectTest() { super.addSourceToWorkspace(SOURCE_NAMES.get(0)); IProject iproject = RuntimeProjectUtil.getProject(uriCorrect, mapperInCorrect); assertNull("When passed IStorage2UriMapper is broken then null instead of project name expected", iproject); @@ -114,7 +114,7 @@ public void getProjectInCorrectTest() { * Tests correct delegation of responsibility to the {@link IStorage2UriMapper}. */ @Test - public void findFileStorageCorrectTest() { + void findFileStorageCorrectTest() { super.addSourceToWorkspace(SOURCE_NAMES.get(0)); assertEquals("Check if the correct file has been returned", RuntimeProjectUtil.findFileStorage(uriCorrect, mapperCorrect), file); } @@ -123,7 +123,7 @@ public void findFileStorageCorrectTest() { * Checks when passed {@link IStorage2UriMapper} is broken then no file expected. */ @Test - public void findFileStorageInCorrectTest() { + void findFileStorageInCorrectTest() { assertNull("When passed IStorage2UriMapper is broken then no file expected", RuntimeProjectUtil.findFileStorage(uriInCorrect, mapperInCorrect)); } diff --git a/com.avaloq.tools.ddk.xtext.ui.test/.classpath b/com.avaloq.tools.ddk.xtext.ui.test/.classpath index 61c6d0a93..338476cab 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/.classpath +++ b/com.avaloq.tools.ddk.xtext.ui.test/.classpath @@ -2,7 +2,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.ui.test/META-INF/MANIFEST.MF index fb7468d43..212a33065 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.ui.test/META-INF/MANIFEST.MF @@ -2,13 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.ui.test Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.ui.test;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.xtext.ui, org.eclipse.xtext.xbase.lib, org.eclipse.xtext.testing, - org.junit, + org.junit.jupiter.api, org.mockito, com.avaloq.tools.ddk.xtext.ui, com.avaloq.tools.ddk.test.core, diff --git a/com.avaloq.tools.ddk.xtext.ui.test/XtextUiTestSuite.launch b/com.avaloq.tools.ddk.xtext.ui.test/XtextUiTestSuite.launch index a3e15eb12..0d284814a 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/XtextUiTestSuite.launch +++ b/com.avaloq.tools.ddk.xtext.ui.test/XtextUiTestSuite.launch @@ -23,7 +23,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.ui.test/pom.xml b/com.avaloq.tools.ddk.xtext.ui.test/pom.xml index 47752bee5..7fd4e5f5c 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.ui.test/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorRunTest.java b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorRunTest.java index 96536c2d7..ae00ab536 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorRunTest.java +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorRunTest.java @@ -43,8 +43,8 @@ import org.eclipse.xtext.util.Pair; import org.eclipse.xtext.util.Tuples; import org.eclipse.xtext.validation.Issue; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatchers; import com.avaloq.tools.ddk.check.runtime.ui.quickfix.IModificationContextRegistry; @@ -95,7 +95,7 @@ protected void configure() { private final WorkbenchMarkerResolutionGenerator wmrg = injector.getInstance(WorkbenchMarkerResolutionGenerator.class); - @Before + @BeforeEach public void setUp() throws Exception { wmrg.setIssueUtil(new IssueUtil()); @@ -128,7 +128,7 @@ private void mockMarkerResource(final URI uri) throws CoreException { } @Test - public void testRun() throws CoreException { + void testRun() throws CoreException { WorkbenchResolutionAdapter adapter = wmrg.new WorkbenchResolutionAdapter(mockIssueResolution, mockMarker); when(mockMarkerHelpRegistry.getResolutions(mockMarker)).thenReturn(mockMarkerResolutions); @@ -142,7 +142,7 @@ public void testRun() throws CoreException { } @Test - public void testSingleRun() throws CoreException { + void testSingleRun() throws CoreException { WorkbenchResolutionAdapter adapter = wmrg.new WorkbenchResolutionAdapter(mockIssueResolution, mockMarker); when(mockMarkerHelpRegistry.getResolutions(mockMarker)).thenReturn(mockMarkerResolutions); diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorTest.java b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorTest.java index 4f30b927c..fa7efcc97 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorTest.java +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/quickfix/WorkbenchResolutionAdaptorTest.java @@ -11,8 +11,8 @@ package com.avaloq.tools.ddk.xtext.ui.quickfix; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -21,10 +21,10 @@ import org.eclipse.xtext.ui.editor.quickfix.IssueResolution; import org.eclipse.xtext.ui.util.IssueUtil; import org.eclipse.xtext.validation.Issue; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; import com.avaloq.tools.ddk.xtext.ui.quickfix.WorkbenchMarkerResolutionGenerator.WorkbenchResolutionAdapter; +import org.junit.jupiter.api.Test; public class WorkbenchResolutionAdaptorTest { @@ -37,13 +37,13 @@ public class WorkbenchResolutionAdaptorTest { private final WorkbenchMarkerResolutionGenerator mockWmrg = mock(WorkbenchMarkerResolutionGenerator.class); - @Before + @BeforeEach public void setUp() throws Exception { when(mockWmrg.getIssueUtil()).thenReturn(new IssueUtil()); } - @Test - public void testGetLabel() { + @org.junit.jupiter.api.Test + void testGetLabel() { IssueResolution mockIssueResolution = mock(IssueResolution.class); IMarker mockMarker = mock(IMarker.class); @@ -54,8 +54,8 @@ public void testGetLabel() { assertEquals("Adapter delegates get label to resolution.", TEST_LABEL, adapter.getLabel()); //$NON-NLS-1$ } - @Test - public void testGetDescription() { + @org.junit.jupiter.api.Test + void testGetDescription() { IssueResolution mockIssueResolution = mock(IssueResolution.class); IMarker mockMarker = mock(IMarker.class); @@ -66,8 +66,8 @@ public void testGetDescription() { assertEquals("Adapter delegates get description to resolution.", TEST_DESCRIPTION, adapter.getDescription()); //$NON-NLS-1$ } - @Test - public void testGetImage() { + @org.junit.jupiter.api.Test + void testGetImage() { IssueResolution mockIssueResolution = mock(IssueResolution.class); IMarker mockMarker = mock(IMarker.class); @@ -78,8 +78,8 @@ public void testGetImage() { assertEquals("Adapter delegates get Image to resolution.", TEST_IMAGE, adapter.getImage()); //$NON-NLS-1$ } - @Test - public void findOtherMarkers() { + @org.junit.jupiter.api.Test + void findOtherMarkers() { IssueResolution mockIssueResolution = mock(IssueResolution.class); IMarker mockResolutionMarker = mock(IMarker.class); when(mockResolutionMarker.getAttribute(Issue.CODE_KEY, null)).thenReturn(CODE1); diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/ResourceNameTemplateVariableResolverTest.java b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/ResourceNameTemplateVariableResolverTest.java index ef08e0d16..ab3db5556 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/ResourceNameTemplateVariableResolverTest.java +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/ResourceNameTemplateVariableResolverTest.java @@ -17,8 +17,8 @@ import org.eclipse.xtext.XtextRuntimeModule; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.ui.editor.templates.XtextTemplateContext; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -77,28 +77,28 @@ public void testResolveValuesWithNullContext() { } @Test - public void testResolveValuesWithFileWithoutExtension() throws TemplateException { + void testResolveValuesWithFileWithoutExtension() throws TemplateException { final String filename = "filenamewithnoextension"; //$NON-NLS-1$ testResolveValues(FILE, filename, filename); } @Test - public void testResolveValuesWithFileWithExtension() throws TemplateException { + void testResolveValuesWithFileWithExtension() throws TemplateException { testResolveValues(FILE, "filename.with.extension", "filename.with"); //$NON-NLS-1$//$NON-NLS-2$ } - @Test - public void testResolveValuesWithExtraParams() throws TemplateException { + @org.junit.jupiter.api.Test + void testResolveValuesWithExtraParams() throws TemplateException { testResolveValues(new Object[] {FILE[0], "other", "random", "values"}, FILENAME, FILENAME); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } - @Test - public void testResolveValuesWithUnknownParam() throws TemplateException { + @org.junit.jupiter.api.Test + void testResolveValuesWithUnknownParam() throws TemplateException { testResolveValues(new Object[] {"This is not the parameter you are looking for"}, FILENAME); //$NON-NLS-1$ } @Test - public void testResolveValuesWithWrongTypeOfParam() throws TemplateException { + void testResolveValuesWithWrongTypeOfParam() throws TemplateException { testResolveValues(new Object[] {42}, FILENAME); } @@ -121,7 +121,7 @@ public void testResolveValues(final Object[] values, final String filename, fina final String[] actualResolvedValues = Iterables.toArray(resolver.resolveValues(variable, mockContext), String.class); // ASSERT - Assert.assertArrayEquals("Resolved values", expectedResolvedValues, actualResolvedValues); //$NON-NLS-1$ + Assertions.assertArrayEquals("Resolved values", expectedResolvedValues, actualResolvedValues); //$NON-NLS-1$ } } diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/SimpleEnumTemplateVariableResolverTest.java b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/SimpleEnumTemplateVariableResolverTest.java index 0cf3acb88..6394c6194 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/SimpleEnumTemplateVariableResolverTest.java +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/SimpleEnumTemplateVariableResolverTest.java @@ -11,7 +11,7 @@ package com.avaloq.tools.ddk.xtext.ui.templates; -import static org.junit.Assert.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.mockito.Mockito.mock; import java.util.List; @@ -20,7 +20,7 @@ import org.eclipse.jface.text.templates.TemplateVariable; import org.eclipse.xtext.XtextRuntimeModule; import org.eclipse.xtext.ui.editor.templates.XtextTemplateContext; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import com.avaloq.tools.ddk.test.core.AfterAll; @@ -50,18 +50,18 @@ public void afterAll() { resolver = null; } - @Test(expected = NullPointerException.class) + @org.junit.jupiter.api.Test(expected = NullPointerException.class) public void testResolveValuesWithNullVariable() { resolver.resolveValues(null, mockContext); } - @Test - public void testResolveValuesWithOneParam() throws TemplateException { + @org.junit.jupiter.api.Test + void testResolveValuesWithOneParam() throws TemplateException { testResolveValues("Value"); //$NON-NLS-1$ } - @Test - public void testResolveValuesWithMultipleParams() throws TemplateException { + @org.junit.jupiter.api.Test + void testResolveValuesWithMultipleParams() throws TemplateException { testResolveValues("Value 1", "Value 2", "Value 3"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ } diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateProposalProviderHelperTest.xtend b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateProposalProviderHelperTest.xtend index 6285b36de..76df10a14 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateProposalProviderHelperTest.xtend +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateProposalProviderHelperTest.xtend @@ -22,11 +22,11 @@ import org.eclipse.jface.text.templates.Template import org.eclipse.xtext.XtextRuntimeModule import org.eclipse.xtext.ui.editor.templates.XtextTemplateContext import org.eclipse.xtext.ui.editor.templates.XtextTemplateContextType -import org.junit.Test +import org.junit.jupiter.api.Test import org.junit.runner.RunWith -import static org.junit.Assert.assertArrayEquals -import static org.junit.Assert.assertEquals +import static org.junit.jupiter.api.Assertions.assertArrayEquals +import static org.junit.jupiter.api.Assertions.assertEquals import static org.mockito.ArgumentMatchers.anyInt import static org.mockito.Mockito.mock import static org.mockito.Mockito.spy diff --git a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateVariableResolverTestHelper.java b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateVariableResolverTestHelper.java index 35fe8a7a6..bbca30b73 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateVariableResolverTestHelper.java +++ b/com.avaloq.tools.ddk.xtext.ui.test/src/com/avaloq/tools/ddk/xtext/ui/templates/TemplateVariableResolverTestHelper.java @@ -11,7 +11,7 @@ package com.avaloq.tools.ddk.xtext.ui.templates; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.eclipse.jface.text.templates.TemplateException; import org.eclipse.jface.text.templates.TemplateTranslator; diff --git a/com.avaloq.tools.ddk.xtext.ui/.classpath b/com.avaloq.tools.ddk.xtext.ui/.classpath index a0c10c21f..7b0f1225c 100644 --- a/com.avaloq.tools.ddk.xtext.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.ui/.classpath @@ -2,7 +2,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.ui/META-INF/MANIFEST.MF index c46a14c07..afa432815 100644 --- a/com.avaloq.tools.ddk.xtext.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.jdt.core, diff --git a/com.avaloq.tools.ddk.xtext.ui/pom.xml b/com.avaloq.tools.ddk.xtext.ui/pom.xml index 42e612517..2215f8bf7 100644 --- a/com.avaloq.tools.ddk.xtext.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.valid.ide/.classpath b/com.avaloq.tools.ddk.xtext.valid.ide/.classpath index 7ce81897b..fc183f78b 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ide/.classpath +++ b/com.avaloq.tools.ddk.xtext.valid.ide/.classpath @@ -11,7 +11,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.valid.ide/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.valid.ide/META-INF/MANIFEST.MF index c34e60b42..ab4443e0f 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ide/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.valid.ide/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.valid.ide Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.valid.ide;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Export-Package: com.avaloq.tools.ddk.xtext.valid.ide.contentassist.antlr, com.avaloq.tools.ddk.xtext.valid.ide.contentassist.antlr.internal diff --git a/com.avaloq.tools.ddk.xtext.valid.ide/pom.xml b/com.avaloq.tools.ddk.xtext.valid.ide/pom.xml index 9820f3310..9b79f722c 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ide/pom.xml +++ b/com.avaloq.tools.ddk.xtext.valid.ide/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext.valid.ui/.classpath b/com.avaloq.tools.ddk.xtext.valid.ui/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ui/.classpath +++ b/com.avaloq.tools.ddk.xtext.valid.ui/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.valid.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.valid.ui/META-INF/MANIFEST.MF index a1584deba..339bb2ffa 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.valid.ui/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.valid.ui Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.valid.ui;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.avaloq.tools.ddk.xtext.ui, com.avaloq.tools.ddk.xtext.valid.ide;visibility:=reexport, diff --git a/com.avaloq.tools.ddk.xtext.valid.ui/pom.xml b/com.avaloq.tools.ddk.xtext.valid.ui/pom.xml index 0571b471c..2d7d22b71 100644 --- a/com.avaloq.tools.ddk.xtext.valid.ui/pom.xml +++ b/com.avaloq.tools.ddk.xtext.valid.ui/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext.valid/.classpath b/com.avaloq.tools.ddk.xtext.valid/.classpath index c3e106958..7887a7ed7 100644 --- a/com.avaloq.tools.ddk.xtext.valid/.classpath +++ b/com.avaloq.tools.ddk.xtext.valid/.classpath @@ -6,7 +6,7 @@ - + diff --git a/com.avaloq.tools.ddk.xtext.valid/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.valid/META-INF/MANIFEST.MF index 2ebc45bdb..8de355ef1 100644 --- a/com.avaloq.tools.ddk.xtext.valid/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.valid/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext.valid Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.valid;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.xtext, org.eclipse.xtext.xtext.generator;resolution:=optional, diff --git a/com.avaloq.tools.ddk.xtext.valid/pom.xml b/com.avaloq.tools.ddk.xtext.valid/pom.xml index 20b591518..2c2284880 100644 --- a/com.avaloq.tools.ddk.xtext.valid/pom.xml +++ b/com.avaloq.tools.ddk.xtext.valid/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/com.avaloq.tools.ddk.xtext/.classpath b/com.avaloq.tools.ddk.xtext/.classpath index cd13ba9b5..fc3dcad58 100644 --- a/com.avaloq.tools.ddk.xtext/.classpath +++ b/com.avaloq.tools.ddk.xtext/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF index b3eb6399e..3826dabd9 100644 --- a/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext Bundle-SymbolicName: com.avaloq.tools.ddk.xtext;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.google.guava, org.apache.commons.lang, diff --git a/com.avaloq.tools.ddk.xtext/pom.xml b/com.avaloq.tools.ddk.xtext/pom.xml index 03b21ebed..f8ff2f969 100644 --- a/com.avaloq.tools.ddk.xtext/pom.xml +++ b/com.avaloq.tools.ddk.xtext/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java index 0ae7db7e8..6a5639112 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java @@ -13,6 +13,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; @@ -123,6 +124,11 @@ public String getSourceText() throws IOException { return SerializationUtil.getCompleteContent(this); } + @Override + protected LinkedHashSet> getResolvingSet(final boolean initial) { + return resolving; + } + /** * Sets whether this resource is currently being loaded. *

    diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDelta.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDelta.java index 3e6dcffad..625e45089 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDelta.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/ResourceDescriptionDelta.java @@ -51,6 +51,7 @@ public String apply(final IEObjectDescription from) { private final URI uri; private IResourceDescription oldDesc; private final SoftReference newDesc; + private IResourceDescription pinnedNewDesc; private final IResourceDescriptions index; private Boolean hasChanges; @@ -98,6 +99,9 @@ public IResourceDescription getNew() { if (newDesc == null) { return null; } + if (pinnedNewDesc != null) { + return pinnedNewDesc; + } IResourceDescription res = newDesc.get(); return res != null ? res : index.getResourceDescription(uri); } @@ -127,6 +131,20 @@ public boolean haveEObjectDescriptionsChanged() { return hasChanges; } + /** + * Ensure the new resource description is not touched by GC. + */ + public void pinNew() { + pinnedNewDesc = newDesc == null ? null : newDesc.get(); + } + + /** + * Reverse the effect of {@link pinNew}. + */ + public void unpinNew() { + pinnedNewDesc = null; + } + /** * Discards the old descriptions as it's either equivalent to the new or can be computed from a diff against the new. * diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java index 858257129..e0658e59f 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java @@ -17,8 +17,6 @@ import java.io.InputStream; import java.util.Map; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; @@ -33,8 +31,6 @@ */ class DirectLinkingEObjectInputStream extends EObjectInputStream { - private static final Logger LOGGER = LogManager.getLogger(DirectLinkingEObjectInputStream.class); - DirectLinkingEObjectInputStream(final InputStream inputStream, final Map options) throws IOException { super(inputStream, options); } @@ -67,8 +63,7 @@ public EObject readEObject(final Resource context) throws IOException { eObject = (EObject) eObject.eGet(feature, false); } } else { - LOGGER.error(String.format("Failed to get EStructuralFeature for Eclass : %s, at readCompressedInt : %d", eObject.eClass(), next)); - + throw new IllegalStateException(String.format("EStructuralFeature can't be null for Eclass : %s, at readCompressedInt : %d", eObject.eClass(), next)); //$NON-NLS-1$ } } return eObject; diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/ProxyModelAssociationsAdapter.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/ProxyModelAssociationsAdapter.java index c74cb74a3..54d37e9fa 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/ProxyModelAssociationsAdapter.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/ProxyModelAssociationsAdapter.java @@ -21,6 +21,7 @@ import org.eclipse.xtext.resource.persistence.StorageAwareResource; import com.avaloq.tools.ddk.xtext.modelinference.InferredModelAssociator; +import com.avaloq.tools.ddk.xtext.resource.ResourceSetOptions; /** @@ -69,6 +70,8 @@ private void ensureAssociationsLoaded() { if (resource.eAdapters().remove(this)) { DirectLinkingResourceStorageLoadable loadable = (DirectLinkingResourceStorageLoadable) ((DirectLinkingResourceStorageFacade) resource.getResourceStorageFacade()).getOrCreateResourceStorageLoadable(resource); try { + // the associations are mappings from AST model elements to inferred model elements (and back) so we cannot skip loading the model. + ResourceSetOptions.setSkipModel(resource.getResourceSet(), false); loadable.loadIntoResource(resource, ResourceLoadMode.ONLY_ASSOCIATIONS); } catch (IOException e) { throw new WrappedException(e); diff --git a/com.avaloq.tools.ddk/.classpath b/com.avaloq.tools.ddk/.classpath index 7292aafec..7b23e03fb 100644 --- a/com.avaloq.tools.ddk/.classpath +++ b/com.avaloq.tools.ddk/.classpath @@ -1,6 +1,6 @@ - + diff --git a/com.avaloq.tools.ddk/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk/META-INF/MANIFEST.MF index 2dfbf3b06..d93f19a05 100644 --- a/com.avaloq.tools.ddk/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk Bundle-SymbolicName: com.avaloq.tools.ddk;singleton:=true -Bundle-Version: 15.3.0.qualifier +Bundle-Version: 16.1.0.qualifier Bundle-Vendor: Avaloq Group AG -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Require-Bundle: com.google.guava, org.apache.commons.lang, diff --git a/com.avaloq.tools.ddk/pom.xml b/com.avaloq.tools.ddk/pom.xml index 5d2236cfb..8bca93133 100644 --- a/com.avaloq.tools.ddk/pom.xml +++ b/com.avaloq.tools.ddk/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk diff --git a/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/MapCache.java b/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/MapCache.java index acf8e041b..6802734cd 100644 --- a/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/MapCache.java +++ b/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/MapCache.java @@ -13,6 +13,9 @@ import java.util.Collection; import java.util.Map; import java.util.Set; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; @@ -104,11 +107,7 @@ public void clear() { @Override public V putIfAbsent(final K key, final V value) { - V oldValue = get(key); - if (oldValue == null) { - oldValue = put(key, value); - } - return oldValue; + return backend.asMap().putIfAbsent(key, value); } @Override @@ -166,4 +165,54 @@ public Set> entrySet() { return backend.asMap().entrySet(); } + @Override + public V computeIfAbsent(final K key, final Function mappingFunction) { + return backend.asMap().computeIfAbsent(key, mappingFunction); + } + + @Override + public V getOrDefault(final Object key, final V defaultValue) { + return backend.asMap().getOrDefault(key, defaultValue); + } + + @Override + public void forEach(final BiConsumer action) { + backend.asMap().forEach(action); + } + + @Override + public void replaceAll(final BiFunction function) { + backend.asMap().replaceAll(function); + } + + @Override + public boolean remove(final Object key, final Object value) { + return backend.asMap().remove(key, value); + } + + @Override + public boolean replace(final K key, final V oldValue, final V newValue) { + return backend.asMap().replace(key, oldValue, newValue); + } + + @Override + public V replace(final K key, final V value) { + return backend.asMap().replace(key, value); + } + + @Override + public V computeIfPresent(final K key, final BiFunction remappingFunction) { + return backend.asMap().computeIfPresent(key, remappingFunction); + } + + @Override + public V compute(final K key, final BiFunction remappingFunction) { + return backend.asMap().compute(key, remappingFunction); + } + + @Override + public V merge(final K key, final V value, final BiFunction remappingFunction) { + return backend.asMap().merge(key, value, remappingFunction); + } + } diff --git a/ddk-configuration/.settings/org.eclipse.jdt.core.prefs b/ddk-configuration/.settings/org.eclipse.jdt.core.prefs index 86b3548c6..5f5715f33 100644 --- a/ddk-configuration/.settings/org.eclipse.jdt.core.prefs +++ b/ddk-configuration/.settings/org.eclipse.jdt.core.prefs @@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -114,7 +114,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=LOW,HIGH,NORMAL org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX diff --git a/ddk-configuration/launches/Maven Clean.launch b/ddk-configuration/launches/Maven Clean.launch index 6af34bdbc..c3457b20c 100644 --- a/ddk-configuration/launches/Maven Clean.launch +++ b/ddk-configuration/launches/Maven Clean.launch @@ -15,6 +15,6 @@ - + diff --git a/ddk-configuration/launches/Maven Verify.launch b/ddk-configuration/launches/Maven Verify.launch index b333ad09b..79cb9627e 100644 --- a/ddk-configuration/launches/Maven Verify.launch +++ b/ddk-configuration/launches/Maven Verify.launch @@ -15,6 +15,6 @@ - + diff --git a/ddk-configuration/launches/devkit-run.launch b/ddk-configuration/launches/devkit-run.launch index 8ae7d2f0f..7dbe6c51b 100644 --- a/ddk-configuration/launches/devkit-run.launch +++ b/ddk-configuration/launches/devkit-run.launch @@ -17,7 +17,7 @@ - + diff --git a/ddk-configuration/pmd/ruleset.xml b/ddk-configuration/pmd/ruleset.xml index 716edcd49..e969f3727 100644 --- a/ddk-configuration/pmd/ruleset.xml +++ b/ddk-configuration/pmd/ruleset.xml @@ -85,6 +85,7 @@ + diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index f2f1fc729..f7321ec45 100644 --- a/ddk-parent/pom.xml +++ b/ddk-parent/pom.xml @@ -4,11 +4,11 @@ com.avaloq.tools.ddk ddk-parent - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT pom - 17 + 21 true @@ -47,15 +47,15 @@ 3.6.0 - 10.23.0 - 3.4.1 + 11.0.0 + 3.5.0 3.1.4 - 4.9.3.0 - 4.9.3 - 3.26.0 - 7.12.0 - 4.0.12 - 2.38.0 + 4.9.4.0 + 4.9.4 + 3.27.0 + 7.15.0 + 4.0.13 + 2.39.0 @@ -146,7 +146,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.1 enforce-versions diff --git a/ddk-repository/category.xml b/ddk-repository/category.xml index 98567a7bc..ff915e552 100644 --- a/ddk-repository/category.xml +++ b/ddk-repository/category.xml @@ -1,15 +1,15 @@ - + - + - + - + diff --git a/ddk-repository/pom.xml b/ddk-repository/pom.xml index ecc0236da..1e29339db 100644 --- a/ddk-repository/pom.xml +++ b/ddk-repository/pom.xml @@ -4,7 +4,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent diff --git a/ddk-target/ddk.target b/ddk-target/ddk.target index f4647b262..dd5bd8cef 100644 --- a/ddk-target/ddk.target +++ b/ddk-target/ddk.target @@ -37,7 +37,7 @@ - + @@ -51,7 +51,8 @@ - + + diff --git a/ddk-target/pom.xml b/ddk-target/pom.xml index 862678c31..94211cad7 100644 --- a/ddk-target/pom.xml +++ b/ddk-target/pom.xml @@ -3,7 +3,7 @@ ddk-parent com.avaloq.tools.ddk - 15.3.0-SNAPSHOT + 16.1.0-SNAPSHOT ../ddk-parent com.avaloq.tools.ddk @@ -14,7 +14,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.6.0 + 3.6.1 attach-artifacts