Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@ExtendWith(InjectionExtension.class)
@InjectWith(CheckInjectorProvider.class)
@SuppressWarnings("nls")
class BugAig1314 {
public class BugAig1314 {

/** Constructor of super class is protected... */
private static class TestScope extends CatalogFromExtensionPointScope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@InjectWith(CheckInjectorProvider.class)
@ExtendWith(InjectionExtension.class)
@SuppressWarnings("nls")
class BugDsl27 extends AbstractCheckGenerationTestCase {
public class BugDsl27 extends AbstractCheckGenerationTestCase {

/**
* Tests that our test source compiles fine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ class CheckScopingTest extends AbstractCheckTestCase {
def void testCheckDescriptionIsInferred() {
initializeTestProject
val check = util.getFirstInstanceOf(getModel("CommonChecks"), typeof(Check))
assertEquals(check.description, "Referenced check cannot be resolved", "This check is javadoc-like commented.")
assertEquals("This check is javadoc-like commented.", check.description, "Referenced check cannot be resolved")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,35 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.test.core;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.check.core.generator.IssueCodeValueTest;
import com.avaloq.tools.ddk.check.core.test.BasicModelTest;
import com.avaloq.tools.ddk.check.core.test.BugAig1314;
import com.avaloq.tools.ddk.check.core.test.BugAig830;
import com.avaloq.tools.ddk.check.core.test.BugDsl27;
import com.avaloq.tools.ddk.check.core.test.CheckScopingTest;
import com.avaloq.tools.ddk.check.core.test.IssueCodeToLabelMapGenerationTest;
import com.avaloq.tools.ddk.check.core.test.ProjectBasedTests;
import com.avaloq.tools.ddk.check.formatting.CheckFormattingTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.check.core.generator",
"com.avaloq.tools.ddk.check.core.test",
"com.avaloq.tools.ddk.check.formatting",
"com.avaloq.tools.ddk.check.validation"
IssueCodeValueTest.class,
BasicModelTest.class,
BugAig830.class,
CheckScopingTest.class,
IssueCodeToLabelMapGenerationTest.class,
ProjectBasedTests.class,
BugAig1314.class,
BugDsl27.class,
CheckFormattingTest.class
// @Format-On
})
public class CheckCoreTestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Provides some tests of the reflective {@link AbstractCheckContext} framework.
*/
@SuppressWarnings("nls")
class CheckContextTest {
public class CheckContextTest {

public static final String ENABLED_ISSUE_CODE = "Enabled.Issue.Code";
public static final String DISABLED_ISSUE_CODE = "Disabled.Issue.Code";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Provides some test cases for the Check extension point.
*/
@SuppressWarnings("nls")
class CheckExtensionPointTests {
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Performs some basic validation tests on the {@link AbstractCheckValidator}.
*/
@SuppressWarnings("nls")
class CheckValidatorTest extends AbstractCheckValidator {
public class CheckValidatorTest extends AbstractCheckValidator {
/**
* Represents the dummy language which is also registered in the plugin.xml.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* Unit test for {@link DefaultCheckRuleLabelProvider}.
*/
@SuppressWarnings("nls")
class CheckRuleLabelProviderTest {
public class CheckRuleLabelProviderTest {

// Test data
private static final int NUM_VALIDATORS = 3;
Expand Down Expand Up @@ -144,7 +144,7 @@ void testSuccess() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertEquals("Label should be " + LABEL + " but was " + label, LABEL, label);
assertEquals(LABEL, label, "Label should be " + LABEL + " but was " + label);
}

/**
Expand Down Expand Up @@ -173,7 +173,7 @@ void testWithNullID() {
final String label = checkRuleLabelProvider.getLabel(null);

// ASSERT
assertNull("Label should be null but was " + label, label);
assertNull(label, "Label should be null but was " + label);
}

/**
Expand All @@ -188,7 +188,7 @@ void testWithNoValidators() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertNull("Label should be null but was " + label, label);
assertNull(label, "Label should be null but was " + label);
}

/**
Expand All @@ -206,7 +206,7 @@ void testWithNoChecks() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertNull("Label should be null but was " + label, label);
assertNull(label, "Label should be null but was " + label);
}

/**
Expand All @@ -226,7 +226,7 @@ void testWhenIssueCodeIsNotACheckIssueCode() {
final String label = checkRuleLabelProvider.getLabel(notACheckIssueCode);

// ASSERT
assertNull("Label should be null but was " + label, label);
assertNull(label, "Label should be null but was " + label);
}

/**
Expand All @@ -247,7 +247,7 @@ void testCaching() {
verify(mockValidator, times(1)).getIssueCodeToLabelMap();
}

assertEquals(label1 + " not equal to " + label2 + " . Equality expected", label1, label2);
assertEquals(label1, label2, label1 + " not equal to " + label2 + " . Equality expected");
}

/**
Expand Down Expand Up @@ -284,7 +284,7 @@ void testInvalidatingCache() {
verify(mockValidator, times(2)).getIssueCodeToLabelMap();
}

assertEquals(label1 + " not equal to " + label2 + " . Equality expected", label1, label2);
assertEquals(label1, label2, label1 + " not equal to " + label2 + " . Equality expected");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,25 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.runtime.test.core;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.check.runtime.context.CheckContextTest;
import com.avaloq.tools.ddk.check.runtime.core.registry.CheckExtensionPointTests;
import com.avaloq.tools.ddk.check.runtime.core.validation.CheckValidatorTest;
import com.avaloq.tools.ddk.check.runtime.label.CheckRuleLabelProviderTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.check.runtime.context",
"com.avaloq.tools.ddk.check.runtime.core.registry",
"com.avaloq.tools.ddk.check.runtime.core.validation",
"com.avaloq.tools.ddk.check.runtime.label"
CheckContextTest.class,
CheckExtensionPointTests.class,
CheckValidatorTest.class,
CheckRuleLabelProviderTest.class
// @Format-On
})
public class CheckRuntimeTestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.test.runtime.tests;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.check.test.runtime.CheckConfigurationIsAppliedTest;
import com.avaloq.tools.ddk.check.test.runtime.CheckExecutionEnvironmentProjectTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.check.test.runtime"
CheckConfigurationIsAppliedTest.class,
CheckExecutionEnvironmentProjectTest.class
// @Format-On
})
public class CheckExecutionEnvironmentTestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@

package com.avaloq.tools.ddk.check.test.runtime.tests;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.check.test.runtime.label.IssueLabelTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.check.test.runtime.label"
IssueLabelTest.class
// @Format-On
})
public class CheckLibraryChecksTestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@

package com.avaloq.tools.ddk.sample.helloworld.test;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.sample.helloworld.check.CheckConfigurationIsAppliedTest;
import com.avaloq.tools.ddk.sample.helloworld.check.CheckExecutionEnvironmentProjectTest;
import com.avaloq.tools.ddk.sample.helloworld.label.IssueLabelTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.sample.helloworld.check",
"com.avaloq.tools.ddk.sample.helloworld.label"
CheckConfigurationIsAppliedTest.class,
CheckExecutionEnvironmentProjectTest.class,
IssueLabelTest.class
// @Format-On
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


@SuppressWarnings("nls")
class AbstractTypeProviderTest {
public class AbstractTypeProviderTest {

protected class TypeImpl extends EObjectImpl implements IType {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Tests that the BuiltInType model instance is correct and complete.
*/
@SuppressWarnings("nls")
class BuiltInTypeModelAccessTest {
public class BuiltInTypeModelAccessTest {

@Test
void testLoadModel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

// You can't have too many tests
@SuppressWarnings({"PMD.ExcessivePublicCount", "nls"})
class ParameterListMatcherTest {
public class ParameterListMatcherTest {

private static final String WRONG_NUMBER_OF_UNNAMED_FORMALS_AFTER_NAMED_FORMALS = "wrong number of unnamed formals after named formals";
private static final String UNNAMED_FORMAL_AFTER_NAMED_NOT_LOCATED = "unnamed formal after named not located";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@
*******************************************************************************/
package com.avaloq.tools.ddk.typesystem.test;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.typesystem.AbstractTypeProviderTest;
import com.avaloq.tools.ddk.typesystem.BuiltInTypeModelAccessTest;
import com.avaloq.tools.ddk.typesystem.ParameterListMatcherTest;


/**
* Junit5 version of test suites. does not implement the logic in our DiscerningSuite.
*/
@Suite
@SelectPackages({
@SelectClasses({
// @Format-Off
"com.avaloq.tools.ddk.typesystem.AbstractTypeProviderTest",
"com.avaloq.tools.ddk.typesystem.BuiltInTypeModelAccessTest",
"com.avaloq.tools.ddk.typesystem.ParameterListMatcherTest"
AbstractTypeProviderTest.class,
BuiltInTypeModelAccessTest.class,
ParameterListMatcherTest.class
// @Format-On
})
public class TypeSystemTestSuite {
Expand Down
7 changes: 4 additions & 3 deletions com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Bundle-Version: 16.3.0.qualifier
Bundle-Vendor: Avaloq Group AG
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-ActivationPolicy: lazy
Require-Bundle: com.avaloq.tools.ddk.xtext,
Require-Bundle: com.avaloq.tools.ddk.xtext,
com.avaloq.tools.ddk.xtext.test.core,
org.eclipse.core.resources,
com.avaloq.tools.ddk.xtext.generator,
org.eclipse.emf.mwe2.launch;resolution:=optional,
org.eclipse.xtext,
org.eclipse.xtext.xtext.generator,
org.eclipse.xtext.xtext.generator,
org.eclipse.xtext.util,
org.eclipse.xtext.ui,
com.avaloq.tools.ddk.xtext.ui,
Expand All @@ -29,7 +29,8 @@ Require-Bundle: com.avaloq.tools.ddk.xtext,
org.eclipse.emf.ecore,
junit-jupiter-api,
junit-jupiter-engine,
junit-vintage-engine
junit-vintage-engine,
junit-platform-suite-api
Import-Package: org.slf4j, org.apache.log4j,
com.avaloq.tools.ddk.check.runtime.test.core,
com.avaloq.tools.ddk.check.test.core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*******************************************************************************/
package com.avaloq.tools.ddk.xtext;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

import com.avaloq.tools.ddk.check.runtime.test.core.CheckRuntimeTestSuite;
import com.avaloq.tools.ddk.check.test.core.CheckCoreTestSuite;
Expand All @@ -34,8 +34,8 @@
// CHECKSTYLE:OFF HideUtilityClassConstructor

// @Format-Off
@RunWith(Suite.class)
@Suite.SuiteClasses({
@Suite
@SelectClasses({
XtextTestSuite.class,
XtextUiTestSuite.class,
GeneratorTestSuite.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import com.google.inject.name.Names;


class WorkbenchResolutionAdaptorRunTest {
public class WorkbenchResolutionAdaptorRunTest {

private static final String TEST_FILE_NAME = "TestFileName"; //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.avaloq.tools.ddk.xtext.ui.quickfix.WorkbenchMarkerResolutionGenerator.WorkbenchResolutionAdapter;


class WorkbenchResolutionAdaptorTest {
public class WorkbenchResolutionAdaptorTest {

private static final String TEST_LABEL = "ATestLabel"; //$NON-NLS-1$
private static final String TEST_DESCRIPTION = "ATestDescription"; //$NON-NLS-1$
Expand Down
Loading