Skip to content

Commit

Permalink
JBIDE-26991 - Update cdi.itests class and method names to contain the…
Browse files Browse the repository at this point in the history
… "CDI12" string instead of containing the "CDI11" string

Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
  • Loading branch information
zcervink committed Jan 6, 2020
1 parent 4d35869 commit 043ca1d
Show file tree
Hide file tree
Showing 56 changed files with 579 additions and 438 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import org.eclipse.reddeer.eclipse.ui.views.markers.ProblemsView.ProblemType;
import org.jboss.tools.cdi.reddeer.annotation.ValidationType;

public class BeansXmlValidationProviderCDI11 extends AbstractValidationProvider {
public class BeansXmlValidationProviderCDI12 extends AbstractValidationProvider {

private final String jsr = "JSR-346";

public BeansXmlValidationProviderCDI11() {
public BeansXmlValidationProviderCDI12() {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
import org.jboss.tools.cdi.reddeer.annotation.ValidationType;

public class ScopeValidationProviderCDI10 extends AbstractValidationProvider {

private final String jsr = "JSR-299";

public ScopeValidationProviderCDI10() {
super();
jsr = "JSR-299";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
import org.eclipse.reddeer.eclipse.ui.views.markers.ProblemsView.ProblemType;
import org.jboss.tools.cdi.reddeer.annotation.ValidationType;

public class ScopeValidationProviderCDI11 extends AbstractValidationProvider {


private final String jsr = "JSR-346";
public class ScopeValidationProviderCDI12 extends AbstractValidationProvider {

public ScopeValidationProviderCDI11() {
public ScopeValidationProviderCDI12() {
super();
jsr = "JSR-346";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,28 @@
*
*/
public class ScopeValidationProviderCDI20 extends AbstractValidationProvider {

private static final String JSR = "JSR-365";

public ScopeValidationProviderCDI20() {
super();
jsr = "JSR-365";
}

@Override
void init() {

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.RETENTION,
"Scope annotation type must be annotated with @Retention(RUNTIME)",JSR,
"Scope annotation type must be annotated with @Retention(RUNTIME)",jsr,
Arrays.asList("to @Retention(RUNTIME)")));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.NO_RETENTION,
"Scope annotation type must be annotated with @Retention(RUNTIME)",JSR,
"Scope annotation type must be annotated with @Retention(RUNTIME)",jsr,
Arrays.asList("Add annotation @Retention(RUNTIME) to class")));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.TARGET,
"Scope annotation type must be annotated with @Target({TYPE, METHOD, FIELD})",JSR,null));
"Scope annotation type must be annotated with @Target({TYPE, METHOD, FIELD})",jsr,null));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.NO_TARGET,
"Scope annotation type must be annotated with @Target({TYPE, METHOD, FIELD})",JSR,null));
"Scope annotation type must be annotated with @Target({TYPE, METHOD, FIELD})",jsr,null));


}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@

public class StereotypeValidationProviderCDI10 extends AbstractValidationProvider {

private final String jsr = "JSR-299";

public StereotypeValidationProviderCDI10() {
super();
jsr = "JSR-299";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
import org.eclipse.reddeer.eclipse.ui.views.markers.ProblemsView.ProblemType;
import org.jboss.tools.cdi.reddeer.annotation.ValidationType;

public class StereotypeValidationProviderCDI11 extends AbstractValidationProvider {
public class StereotypeValidationProviderCDI12 extends AbstractValidationProvider {

private final String jsr = "JSR-346";

public StereotypeValidationProviderCDI11() {
public StereotypeValidationProviderCDI12() {
super();
jsr = "JSR-346";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,31 @@
*/
public class StereotypeValidationProviderCDI20 extends AbstractValidationProvider {

private static final String JSR = "JSR-365";

public StereotypeValidationProviderCDI20() {
super();
jsr = "JSR-365";
}

@Override
void init() {

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.TARGET,
"Stereotype annotation type must be annotated with one of", JSR, null));
"Stereotype annotation type must be annotated with one of", jsr, null));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.RETENTION,
"Stereotype annotation type must be annotated with @Retention(RUNTIME)", JSR,
"Stereotype annotation type must be annotated with @Retention(RUNTIME)", jsr,
Arrays.asList("to @Retention(RUNTIME)")));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.NO_RETENTION,
"Stereotype annotation type must be annotated with @Retention(RUNTIME)", JSR,
"Stereotype annotation type must be annotated with @Retention(RUNTIME)", jsr,
Arrays.asList("Add annotation @Retention(RUNTIME) to class")));

problems.add(new ValidationProblem(ProblemType.WARNING, ValidationType.TYPED,
"A stereotype should not be annotated @Typed", JSR, Arrays.asList(
"A stereotype should not be annotated @Typed", jsr, Arrays.asList(
"Delete annotation @Typed")));

problems.add(new ValidationProblem(ProblemType.ERROR, ValidationType.NAMED,
"Stereotype declares a non-empty @Named annotation", JSR, Arrays.asList(
"Stereotype declares a non-empty @Named annotation", jsr, Arrays.asList(
"to @Named")));

}
Expand Down
8 changes: 4 additions & 4 deletions tests/org.jboss.tools.cdi.bot.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
</properties>
</profile>
<profile>
<id>cdi11-smoke-tests</id>
<id>cdi12-smoke-tests</id>
<properties>
<suiteClass>org.jboss.tools.cdi.bot.test.CDI11SmokeSuite</suiteClass>
<suiteClass>org.jboss.tools.cdi.bot.test.CDI12SmokeSuite</suiteClass>
</properties>
</profile>
<profile>
Expand All @@ -54,9 +54,9 @@
</properties>
</profile>
<profile>
<id>cdi11-tests</id>
<id>cdi12-tests</id>
<properties>
<suiteClass>org.jboss.tools.cdi.bot.test.CDI11SuiteTest</suiteClass>
<suiteClass>org.jboss.tools.cdi.bot.test.CDI12SuiteTest</suiteClass>
</properties>
</profile>
<profile>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*******************************************************************************
* Copyright (c) 2007-2020 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.cdi.bot.test;

import org.eclipse.reddeer.junit.runner.RedDeerSuite;
import org.jboss.tools.cdi.bot.test.beans.bean.cdi12.BeanValidationQuickFixTestCDI12;
import org.jboss.tools.cdi.bot.test.beans.named.cdi12.NamedComponentsSearchingTestCDI12;
import org.jboss.tools.cdi.bot.test.beans.openon.cdi12.BeanInjectOpenOnTestCDI12;
import org.jboss.tools.cdi.bot.test.beans.openon.cdi12.FindObserverEventTestCDI12;
import org.jboss.tools.cdi.bot.test.beansxml.cdi12.BeansXMLBeansEditorTestCDI12;
import org.jboss.tools.cdi.bot.test.beansxml.cdi12.BeansXMLDiscoveryModesTestCDI12;
import org.jboss.tools.cdi.bot.test.beansxml.cdi12.BeansXMLValidationTestCDI12;
import org.jboss.tools.cdi.bot.test.beansxml.completion.cdi12.BeansXMLCompletionTestCDI12;
import org.jboss.tools.cdi.bot.test.beansxml.validation.cdi12.BeansXMLValidationQuickFixTestCDI12;
import org.jboss.tools.cdi.bot.test.validation.cdi12.CDIValidatorTestCDI12;
import org.jboss.tools.cdi.bot.test.wizard.cdi12.CDIWebProjectWizardTestCDI12;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(RedDeerSuite.class)
@SuiteClasses({
BeanValidationQuickFixTestCDI12.class,
NamedComponentsSearchingTestCDI12.class,
BeanInjectOpenOnTestCDI12.class,
FindObserverEventTestCDI12.class,
BeansXMLCompletionTestCDI12.class,
BeansXMLBeansEditorTestCDI12.class,
BeansXMLValidationTestCDI12.class,
BeansXMLValidationQuickFixTestCDI12.class,
CDIValidatorTestCDI12.class,
CDIWebProjectWizardTestCDI12.class,
BeansXMLDiscoveryModesTestCDI12.class
})
public class CDI12SmokeSuite {

}

0 comments on commit 043ca1d

Please sign in to comment.