Skip to content
Draft
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 @@ -73,7 +73,7 @@ public abstract class AbstractCheckTestCase {
private Provider<XtextResourceSet> resourceSetProvider;

@BeforeEach
public void setUp() throws Exception {
void setUp() throws Exception {
getInjector().injectMembers(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@ExtendWith(InjectionExtension.class)
@InjectWith(CheckInjectorProvider.class)
@SuppressWarnings("nls")
public class BugAig1314 {
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")
public class BugDsl27 extends AbstractCheckGenerationTestCase {
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 @@ -10,37 +10,18 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.test.core;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.SelectPackages;
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
@SelectClasses({
// @Format-Off
IssueCodeValueTest.class,
BasicModelTest.class,
BugAig830.class,
CheckScopingTest.class,
IssueCodeToLabelMapGenerationTest.class,
ProjectBasedTests.class,
BugAig1314.class,
BugDsl27.class,
CheckFormattingTest.class
// @Format-On
@SelectPackages({
"com.avaloq.tools.ddk.check.core.test"
})
public class CheckCoreTestSuite {
class CheckCoreTestSuite {

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public InputStream createInputStream(final URI uri, final Map<?, ?> options) thr
};
}

@SuppressWarnings("restriction")
@Override
public void load(final Map<?, ?> options) throws IOException {
modelLocation = (IModelLocation) options.get(MAYBE_LOCATION_DATA);
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")
public class CheckContextTest {
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")
public class CheckExtensionPointTests {
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")
public class CheckValidatorTest extends AbstractCheckValidator {
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")
public class CheckRuleLabelProviderTest {
class CheckRuleLabelProviderTest {

// Test data
private static final int NUM_VALIDATORS = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,22 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.runtime.test.core;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.IncludeClassNamePatterns;
import org.junit.platform.suite.api.SelectPackages;
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
@SelectClasses({
// @Format-Off
CheckContextTest.class,
CheckExtensionPointTests.class,
CheckValidatorTest.class,
CheckRuleLabelProviderTest.class
// @Format-On
@SelectPackages({
"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"
})
public class CheckRuntimeTestSuite {
@IncludeClassNamePatterns(".*Test.*")
class CheckRuntimeTestSuite {

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,18 @@
*******************************************************************************/
package com.avaloq.tools.ddk.check.test.runtime.tests;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.SelectPackages;
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
@SelectClasses({
// @Format-Off
CheckConfigurationIsAppliedTest.class,
CheckExecutionEnvironmentProjectTest.class
// @Format-On
@SelectPackages({
"com.avaloq.tools.ddk.check.test.runtime"
})
public class CheckExecutionEnvironmentTestSuite {
class CheckExecutionEnvironmentTestSuite {

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,18 @@

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

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.SelectPackages;
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
@SelectClasses({
// @Format-Off
IssueLabelTest.class
// @Format-On
@SelectPackages({
"com.avaloq.tools.ddk.check.test.runtime.label"
})
public class CheckLibraryChecksTestSuite {
class CheckLibraryChecksTestSuite {

}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
@ExtendWith(InjectionExtension.class)
@SuppressWarnings("nls")
@TestInstance(Lifecycle.PER_CLASS)
public class CheckCatalogWizardTest {
class CheckCatalogWizardTest {

/** This is the name of the catalog wizard. It's the name SWTBot uses to look up the wizard. */
private static final String CHECK_CATALOG = "Check Catalog";
Expand Down Expand Up @@ -121,7 +121,7 @@ protected void execute(final IProgressMonitor monitor) throws CoreException, Inv
* </p>
*/
@BeforeEach
public void setUp() {
void setUp() {
wizard = new SwtWizardBot();
project = createProject();
for (Grammar g : new CheckResourceUtil().getGrammars()) { // make sure all grammars accessible for combo field.
Expand All @@ -141,7 +141,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.
Expand All @@ -152,7 +152,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.
Expand All @@ -168,7 +168,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();

Expand All @@ -180,7 +180,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();
Expand All @@ -196,7 +196,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();
Expand All @@ -209,7 +209,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();
Expand All @@ -223,7 +223,7 @@ public void testCatalogNameInvalid() {
* Tests that discouraged catalog names are accepted.
*/
@Test
public void testCatalogNameDiscouraged() {
void testCatalogNameDiscouraged() {
selectProjectFolder(wizard, VALID_PACKAGE_NAME);
initializeWizardBot();

Expand All @@ -236,7 +236,7 @@ public void testCatalogNameDiscouraged() {
* Tests valid catalog names.
*/
@Test
public void testCatalogName() {
void testCatalogName() {
selectProjectFolder(wizard, VALID_PACKAGE_NAME);
initializeWizardBot();

Expand All @@ -263,7 +263,7 @@ public void testInitiallyNoGrammarSelected() {
* if project doesn't exist.
*/
@AfterEach
public void tearDown() throws CoreException {
void tearDown() throws CoreException {
wizard.closeWizard();
project.delete(true, new NullProgressMonitor());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@InjectWith(CheckWizardUiTestInjectorProvider.class)
@ExtendWith(InjectionExtension.class)
@SuppressWarnings("nls")
public class CheckProjectWizardTest {
class CheckProjectWizardTest {

/** This is the name of the project wizard. It's the name SWTBot uses to look up the wizard. */
private static final String CHECK_PROJECT_WIZARD_NAME = "Check Project";
Expand All @@ -49,7 +49,7 @@ public class CheckProjectWizardTest {
* Start again the Check project wizard before every test.
*/
@BeforeEach
public void setUp() {
void setUp() {
wizard = new SwtWizardBot();
wizard.openNewWizard(CHECK_PROJECT_WIZARD_NAME);
}
Expand All @@ -58,7 +58,7 @@ public void setUp() {
* Check if the project wizard is available.
*/
@Test
public void testCheckProjectWizardIsAvailable() {
void testCheckProjectWizardIsAvailable() {
assertNotNull(wizard, "the project wizard was found");
CheckWizardTestUtil.assertButtonsEnabled(false, true, false, wizard);
}
Expand All @@ -67,7 +67,7 @@ public void testCheckProjectWizardIsAvailable() {
* Test if the buttons 'next', 'back' and 'finish' are correctly enabled/disabled.
*/
@Test
public void testProjectNameInvalid() {
void testProjectNameInvalid() {
CheckWizardTestUtil.projectName(wizard, "", CheckWizardTestUtil.NEXT_DISABLED);
CheckWizardTestUtil.projectName(wizard, ".project.name", CheckWizardTestUtil.NEXT_DISABLED);
CheckWizardTestUtil.projectName(wizard, "Project.name", CheckWizardTestUtil.NEXT_DISABLED);
Expand All @@ -88,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);
}
Expand All @@ -97,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();
Expand All @@ -122,7 +122,7 @@ public void testNextButtonChangesPage() {
* Close the wizard after every test.
*/
@AfterEach
public void tearDown() {
void tearDown() {
wizard.closeWizard();
}

Expand Down
Loading