Author: akazakov
Date: 2011-05-25 20:32:38 -0400 (Wed, 25 May 2011)
New Revision: 31503
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AnnotationsValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DependentProjectValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ELValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8576
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AnnotationsValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AnnotationsValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AnnotationsValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* Wrong targets in CDI annotation types.
@@ -25,99 +26,99 @@
public void testQualifierWithMissingTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/qualifier/broken/Hairy_MissingTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 36);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 36);
}
public void testQualifierWithMissingRetention() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/qualifier/broken/Hairy_MissingRetention.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, 36);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, 36);
}
public void testQualifierWithWrongTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/qualifier/broken/Hairy_WrongTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 32);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 32);
}
public void testQualifierWithTargetOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/qualifier/HairyTargetOk.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 14);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) +
".*", 14);
}
public void testStereotypeWithMissingTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/stereotype/broken/FishStereotype_MissingTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE.substring(0, 56) +
".*", 19);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE.substring(0, 56) +
".*", 19);
}
public void testStereotypeWithMissingRetention() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/stereotype/broken/FishStereotype_MissingRetention.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, 19);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, 19);
}
public void testStereotypeWithWrongTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/stereotype/broken/FishStereotype_WrongTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE.substring(0, 56) +
".*", 15);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE.substring(0, 56) +
".*", 15);
}
public void testScopeWithMissingTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE.substring(0, 52) +
".*", 33);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE.substring(0, 52) +
".*", 33);
}
public void testScopeWithMissingRetention() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE, 33);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE, 33);
}
public void testScopeWithWrongTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE.substring(0, 52) +
".*", 30);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE.substring(0, 52) +
".*", 30);
}
public void testStereotypesWithAdditionalStereotypesWithTMFTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeTMFBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_TMF,
"StereotypeWTypeTarget", "StereotypeTMFBroken"), 15);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_TMF,
"StereotypeWTypeTarget", "StereotypeTMFBroken"), 15);
}
public void testStereotypesWithAdditionalStereotypesWithMTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeMBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_M,
"StereotypeWTypeTarget", "StereotypeMBroken"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_M,
"StereotypeWTypeTarget", "StereotypeMBroken"), 13);
}
public void testStereotypesWithAdditionalStereotypesWithFTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeFBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_F,
"StereotypeWTypeTarget", "StereotypeFBroken"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_F,
"StereotypeWTypeTarget", "StereotypeFBroken"), 13);
}
public void testStereotypesWithAdditionalStereotypesWithMFTarget() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeMFBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF,
"StereotypeWTypeTarget", "StereotypeMFBroken"), 14);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF,
"StereotypeWTypeTarget", "StereotypeMFBroken"), 14);
}
public void testStereotypesWithAdditionalStereotypesOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_TMF,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_M,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_F,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_TMF,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_M,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_F,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF,
"StereotypeWTypeTarget", "StereotypeOk"), 13);
}
public void testInterceptorBindingWithAdditionalInterceptorBindings() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/InterceptorBindingBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE,
"InterceptorBindingWTypeTarget", "InterceptorBindingBroken"), 16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE,
"InterceptorBindingWTypeTarget", "InterceptorBindingBroken"), 16);
}
public void testInterceptorBindingWithAdditionalInterceptorBindingsOk() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/InterceptorBindingOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE,
"InterceptorBindingWTypeTarget", "InterceptorBindingOk"), 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE,
"InterceptorBindingWTypeTarget", "InterceptorBindingOk"), 15);
}
public void testInterceptorBindingsForStereotypes() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeWithInterceptorBindingBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE,
"StereotypeWithInterceptorBindingBroken",
"InterceptorBindingWTypeTarget"), 16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE,
"StereotypeWithInterceptorBindingBroken",
"InterceptorBindingWTypeTarget"), 16);
}
public void testInterceptorBindingsForStereotypesOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/target/StereotypeOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE,
"StereotypeOk", "InterceptorBindingWTypeTarget"), 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE,
"StereotypeOk", "InterceptorBindingWTypeTarget"), 15);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -34,8 +35,8 @@
*/
public void testNoAlternativeClassWithSpecifiedName() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME,
false, 7);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME, 19);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME, false, 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME, 19);
}
/**
@@ -45,8 +46,8 @@
*/
public void testIllegalAlternativeClassWithSpecifiedName() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_ALTERNATIVE_BEAN_CLASS, 4);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_ALTERNATIVE_BEAN_CLASS,
19);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_ALTERNATIVE_BEAN_CLASS, 4);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_ALTERNATIVE_BEAN_CLASS, 19);
}
/**
@@ -57,8 +58,8 @@
*/
public void testNoAlternativeAnnotationWithSpecifiedName() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME,
12);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME, 17);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME, 12);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME, 17);
}
/**
@@ -68,8 +69,8 @@
*/
public void testIllegalAlternativeAnnotationWithSpecifiedName() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_ALTERNATIVE_ANNOTATION, 15);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_ALTERNATIVE_ANNOTATION,
17);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_ALTERNATIVE_ANNOTATION, 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_ALTERNATIVE_ANNOTATION, 17);
}
/**
@@ -79,9 +80,9 @@
*/
public void testSameAlternativeClassListedTwice() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 20, 22,
26, 27);
- assertMarkerIsNotCreated(file, CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 17);
- assertMarkerIsNotCreated(file, CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 19);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 20, 22, 26, 27);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 17);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLICATE_ALTERNATIVE_TYPE, 19);
}
/**
@@ -91,8 +92,8 @@
*/
public void testNonExistantDecoratorClassInBeansXmlNotOK() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.UNKNOWN_DECORATOR_BEAN_CLASS_NAME,
34);
- assertMarkerIsNotCreated(file, CDIValidationMessages.UNKNOWN_DECORATOR_BEAN_CLASS_NAME,
BAR_DECORATOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNKNOWN_DECORATOR_BEAN_CLASS_NAME, 34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_DECORATOR_BEAN_CLASS_NAME, BAR_DECORATOR_LINE);
}
/**
@@ -102,8 +103,8 @@
*/
public void testEnabledDecoratorNotADecorator() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_DECORATOR_BEAN_CLASS, 37);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_DECORATOR_BEAN_CLASS,
BAR_DECORATOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_DECORATOR_BEAN_CLASS, 37);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_DECORATOR_BEAN_CLASS, BAR_DECORATOR_LINE);
}
/**
@@ -113,8 +114,8 @@
*/
public void testDecoratorListedTwiceInBeansXmlNotOK() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.DUPLICATE_DECORATOR_CLASS, 39, 40);
- assertMarkerIsNotCreated(file, CDIValidationMessages.DUPLICATE_DECORATOR_CLASS,
BAR_DECORATOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLICATE_DECORATOR_CLASS, 39, 40);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLICATE_DECORATOR_CLASS, BAR_DECORATOR_LINE);
}
/**
@@ -124,8 +125,8 @@
*/
public void testNonExistantClassInBeansXmlNotOk() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.UNKNOWN_INTERCEPTOR_CLASS_NAME,
FOO_LINE);
- assertMarkerIsNotCreated(file, CDIValidationMessages.UNKNOWN_INTERCEPTOR_CLASS_NAME,
CAT_INTERCEPTOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNKNOWN_INTERCEPTOR_CLASS_NAME, FOO_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_INTERCEPTOR_CLASS_NAME, CAT_INTERCEPTOR_LINE);
}
/**
@@ -135,8 +136,8 @@
*/
public void testNonInterceptorClassInBeansXmlNotOk() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_CLASS,
NON_INTERCEPTOR_LINE);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_CLASS,
CAT_INTERCEPTOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_CLASS, NON_INTERCEPTOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_CLASS, CAT_INTERCEPTOR_LINE);
}
/**
@@ -146,7 +147,7 @@
*/
public void testSameInterceptorClassListedTwiceInBeansXmlNotOk() throws Exception {
IFile file = tckProject.getFile("WebContent/WEB-INF/beans.xml");
- assertMarkerIsCreated(file, CDIValidationMessages.DUPLICATE_INTERCEPTOR_CLASS,
FORD_INTERCEPTOR_1_LINE, FORD_INTERCEPTOR_2_LINE);
- assertMarkerIsNotCreated(file, CDIValidationMessages.DUPLICATE_INTERCEPTOR_CLASS,
CAT_INTERCEPTOR_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLICATE_INTERCEPTOR_CLASS, FORD_INTERCEPTOR_1_LINE,
FORD_INTERCEPTOR_2_LINE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLICATE_INTERCEPTOR_CLASS, CAT_INTERCEPTOR_LINE);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -32,7 +33,7 @@
*/
public void testLegalTypesInTyped() throws Exception {
IFile petShopFile =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/PetShop.java");
- assertMarkerIsCreated(petShopFile,
CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION_IN_PRODUCER_FIELD, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile,
CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION_IN_PRODUCER_FIELD, 25);
}
/**
@@ -43,7 +44,7 @@
*/
public void testInterceptorWithWrongScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithWrongScopeBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR, 8);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR, 8);
}
/**
@@ -54,7 +55,7 @@
*/
public void testDecoratorWithWrongScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/DecoratorWithWrongScopeBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR, 7);
}
/**
@@ -65,7 +66,7 @@
*/
public void testMultipleBeanScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/scope/broken/tooManyScopes/BeanWithTooManyScopeTypes_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS, 22, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS, 22, 23);
}
/**
@@ -77,7 +78,7 @@
*/
public void testBeanWithMultipleScopedStereotypes() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/Scallop_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, 24, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, 24, 25);
}
/**
@@ -88,9 +89,9 @@
*/
public void testNamedInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NamedInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INTERCEPTOR_HAS_NAME, 9);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NamedStereotypedInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INTERCEPTOR_HAS_NAME, 7);
}
/**
@@ -101,9 +102,9 @@
*/
public void testNamedDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/NamedDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DECORATOR_HAS_NAME, 10);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/NamedStereotypedDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 8);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DECORATOR_HAS_NAME, 8);
}
/**
@@ -114,7 +115,7 @@
*/
public void testAlternativeInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/AlternativeInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_IS_ALTERNATIVE, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INTERCEPTOR_IS_ALTERNATIVE, 7);
}
/**
@@ -125,7 +126,7 @@
*/
public void testAlternativeDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/AlternativeDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_IS_ALTERNATIVE, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DECORATOR_IS_ALTERNATIVE, 7);
}
/**
@@ -136,7 +137,7 @@
*/
public void testStereotypeScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, 32, 33);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, 32, 33);
}
/**
@@ -147,7 +148,7 @@
*/
public void testNonEmptyNamedForStereotype() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.STEREOTYPE_DECLARES_NON_EMPTY_NAME,
31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.STEREOTYPE_DECLARES_NON_EMPTY_NAME, 31);
}
/**
@@ -158,7 +159,7 @@
*/
public void testAnnotatedStereotype() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_QUALIFIER_IN_STEREOTYPE,
30);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_QUALIFIER_IN_STEREOTYPE, 30);
}
/**
@@ -169,7 +170,7 @@
*/
public void testTypedStereotype() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.STEREOTYPE_IS_ANNOTATED_TYPED, 15);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.STEREOTYPE_IS_ANNOTATED_TYPED, 15);
}
/**
@@ -180,7 +181,7 @@
*/
public void testInterceptorCanNotAlsoBeDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptingDecorator.java");
- assertMarkerIsCreated(file, CDIValidationMessages.BOTH_INTERCEPTOR_AND_DECORATOR, 24,
25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.BOTH_INTERCEPTOR_AND_DECORATOR, 24, 25);
}
/**
@@ -191,7 +192,7 @@
*/
public void testNonDependentScopedBeanCanNotHavePublicField() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/dependentWithPublicField/Leopard_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
}
/**
@@ -202,7 +203,7 @@
*/
public void testNonDependentGenericManagedBeanNotOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/bean/genericbroken/FooBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, 21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, 21);
}
/**
@@ -214,7 +215,7 @@
*/
public void testSpecializingClassExtendsNonSimpleBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN,
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
}
/**
@@ -226,7 +227,7 @@
*/
public void testSpecializingClassDirectlyExtendsNothing() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN,
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
}
/**
@@ -238,7 +239,7 @@
*/
public void testSpecializingClassDirectlyExtendsEnterpriseBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN,
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
}
/**
@@ -250,7 +251,7 @@
*/
public void testSpecializingClassImplementsInterfaceAndExtendsNothing() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN,
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
}
/**
@@ -262,7 +263,7 @@
*/
public void testStatelessWithRequestScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
}
/**
@@ -274,7 +275,7 @@
*/
public void testStatelessWithApplicationScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
}
/**
@@ -286,7 +287,7 @@
*/
public void testStatelessWithConversationScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
}
/**
@@ -298,7 +299,7 @@
*/
public void testStatelessWithSessionScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
}
@@ -311,7 +312,7 @@
*/
public void testSingletonWithConversationScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 24);
}
/**
@@ -323,7 +324,7 @@
*/
public void testSingletonWithSessionScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 25);
}
/**
@@ -335,7 +336,7 @@
*/
public void testSingletonWithRequestScopeFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 23);
}
/**
@@ -346,7 +347,7 @@
*/
public void testSessionBeanAnnotatedInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR,
8, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, 8, 9);
}
/**
@@ -357,7 +358,7 @@
*/
public void testSessionBeanAnnotatedDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, 6,
7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, 6, 7);
}
/**
@@ -368,7 +369,7 @@
*/
public void testNonDependentGenericSessionBeanNotOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/FooBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, 6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, 6);
}
/**
@@ -379,7 +380,7 @@
*/
public void testSpecializingClassDirectlyExtendsSimpleBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsSimpleBean/Tractor_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN,
22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
}
/**
@@ -390,7 +391,7 @@
*/
public void testSpecializingEnterpriseClassImplementsInterfaceAndExtendsNothing() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/implementInterfaceAndExtendsNothing/Donkey_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN,
22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
}
/**
@@ -401,7 +402,7 @@
*/
public void testSpecializingEnterpriseClassDirectlyExtendsNothing() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsNothing/Cow_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN,
22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
}
/**
@@ -415,7 +416,7 @@
*/
public void testParameterizedReturnTypeWithWildcard() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithWildcard/SpiderProducer.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, 24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, 24);
}
/**
@@ -429,9 +430,9 @@
*/
public void testParameterizedType() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithTypeParameter2/TProducer.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 25);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 13);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 13);
}
/**
@@ -442,10 +443,10 @@
*/
public void testParameterizedReturnTypeWithWrongScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
29, 43);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
25);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
35);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
39);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 29, 43);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 25);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 35);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 39);
}
/**
@@ -455,8 +456,8 @@
*/
public void testParameterizedReturnTypeWithoutTypeVariableOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
52);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
57);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 52);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 57);
}
/**
@@ -467,7 +468,7 @@
*/
public void testInitializerMethodAnnotatedProduces() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/initializer/broken/methodAnnotatedProduces/Pheasant_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 25);
}
/**
@@ -478,7 +479,7 @@
*/
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 25, 26);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 25, 26);
}
/**
@@ -489,7 +490,7 @@
*/
public void testProducerMethodWithParameterAnnotatedObserves() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedObserves/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 26);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 26);
}
/**
@@ -501,7 +502,7 @@
public void testProducerMethodOnSessionBeanMustBeBusinessMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new
String[]{"createFoo", "FooProducer"});
- assertMarkerIsCreated(file, bindedErrorMessage, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 25);
}
/**
@@ -514,7 +515,7 @@
public void testProducerMethodOnSessionBeanMustBeBusinessMethodWithoutLocalInterface()
throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/WidgetRepositoryProducerOk.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new
String[]{"retrieveEntityManager", "WidgetRepositoryProducerOk"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 14);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 14);
}
/**
@@ -527,7 +528,7 @@
public void testProducerMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new
String[]{"retrieveEntityManager", "NotBusinessMethod_Broken"});
- assertMarkerIsCreated(file, bindedErrorMessage, 13);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 13);
}
/**
@@ -541,7 +542,7 @@
public void testProducerMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new
String[]{"retrieveEntityManager", "DisposerOk"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 15);
}
/**
@@ -552,7 +553,7 @@
*/
public void testDecoratorMustNotHaveProducerMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/DecoratorHasProducerMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_IN_DECORATOR, 10);
}
/**
@@ -563,7 +564,7 @@
*/
public void testInterceptorMustNotHaveProducerMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/InterceptorHasProducerMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 17);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 17);
}
/**
@@ -574,7 +575,7 @@
*/
public void testSpecializedStaticMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/FurnitureShop_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC,
24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, 24);
}
/**
@@ -585,7 +586,7 @@
*/
public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/ShoeShop_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, 24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, 24);
}
/**
@@ -596,7 +597,7 @@
*/
public void testMultipleDisposeParameters() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/multiParams/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30,
30);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
}
/**
@@ -607,7 +608,7 @@
*/
public void testProducesUnallowed() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/producesUnallowed/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 30, 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 30, 31);
}
/**
@@ -618,7 +619,7 @@
*/
public void testObserverParameterUnallowed() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
}
/**
@@ -629,7 +630,7 @@
*/
public void testInitializerUnallowed() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 32, 33);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 32, 33);
}
/**
@@ -641,10 +642,10 @@
public void testDisposalMethodNotBusinessOrStatic() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/methodOnSessionBean/AppleTree.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new
String[]{"recycle", "AppleTree"});
- assertMarkerIsCreated(file, bindedErrorMessage, 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 31);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java");
bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN,
new String[]{"disposeLitter", "Fox"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 73);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 73);
}
/**
@@ -657,7 +658,7 @@
public void testDisposalMethodNotBusinessOrStaticWithoutLocalInterface() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/WidgetRepositoryProducerOk.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new
String[]{"disposeEntityManager", "WidgetRepositoryProducerOk"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 18);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 18);
}
/**
@@ -670,7 +671,7 @@
public void testDisposalMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new
String[]{"disposeEntityManager", "NotBusinessMethod_Broken"});
- assertMarkerIsCreated(file, bindedErrorMessage, 18);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 18);
}
/**
@@ -684,7 +685,7 @@
public void testDisposalMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new
String[]{"disposeEntityManager", "DisposerOk"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 20);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 20);
}
/**
@@ -695,7 +696,7 @@
*/
public void testDecoratorDeclaresDisposer() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/TimestampLogger.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_IN_DECORATOR, 6, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DISPOSER_IN_DECORATOR, 6, 9);
}
/**
@@ -706,7 +707,7 @@
*/
public void testInterceptorDeclaresDisposer() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FordInterceptor.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_IN_INTERCEPTOR, 8, 16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DISPOSER_IN_INTERCEPTOR, 8, 16);
}
/**
@@ -717,8 +718,8 @@
*/
public void testUnresolvedDisposalMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/unresolvedMethod/SpiderProducer_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 35);
- assertMarkerIsNotCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER,
31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 35);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 31);
}
/**
@@ -729,7 +730,7 @@
*/
public void testMultipleDisposersForProducer() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/TimestampLogger_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSERS_FOR_PRODUCER, 13,
16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_DISPOSERS_FOR_PRODUCER, 13, 16);
}
/**
@@ -740,8 +741,8 @@
*/
public void testParameterizedTypeWithWildcard() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java");
- assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 23, 1011, 1026);
- assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 24, 1100, 1125);
+ AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 23, 1011, 1026);
+ AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 24, 1100, 1125);
}
/**
@@ -752,7 +753,7 @@
*/
public void testTypeVariable() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE,
10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, 10);
}
/**
@@ -763,10 +764,10 @@
*/
public void testParameterizedTypeWithWrongScope() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 15,
22);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD,
13);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD,
18);
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD,
20);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 15, 22);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 18);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 20);
}
/**
@@ -780,7 +781,7 @@
*/
public void testProducerAnnotatedInject() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 8);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 8);
}
/**
@@ -791,7 +792,7 @@
*/
public void testNonStaticProducerOfSessionBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, 9);
}
/**
@@ -802,7 +803,7 @@
*/
public void testDecoratorMustNotHaveProducerField() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/DecoratorHasProducerFieldBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_IN_DECORATOR, 9);
}
/**
@@ -813,7 +814,7 @@
*/
public void testInterceptorMustNotHaveProducerField() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/InterceptorHasProducerFieldBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 16);
}
/**
@@ -824,7 +825,7 @@
*/
public void testResourceWithELName() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/resources/ProducerFieldsBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME,
15, 19, 24, 27, 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, 15, 19, 24, 27, 31);
}
/*
@@ -849,7 +850,7 @@
*/
public void testTooManyInitializerAnnotatedConstructor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/tooManyInitializerAnnotatedConstructors/Goose_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_INJECTION_CONSTRUCTORS, 24,
29);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_INJECTION_CONSTRUCTORS, 24, 29);
}
/**
@@ -860,7 +861,7 @@
*/
public void testConstructorHasDisposesParameter() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasDisposesParameter/DisposingConstructor.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES, 24, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES, 24, 25);
}
/**
@@ -871,7 +872,7 @@
*/
public void testConstructorHasObservesParameter() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_OBSERVES, 25, 26);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_OBSERVES, 25, 26);
}
/**
@@ -882,7 +883,7 @@
*/
public void testStaticInitializerMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/GenericInitializerMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, 11);
}
/**
@@ -893,8 +894,8 @@
*/
public void testInitializerMethodHasParameterAnnotatedDisposes() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedDisposes/Capercaillie_Broken.java");
- assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 25, 1003, 1010);
- assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 26, 1048, 1057);
+ AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 25, 1003, 1010);
+ AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file,
CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 26, 1048, 1057);
}
/**
@@ -905,7 +906,7 @@
*/
public void testGenericInitializerMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/GenericInitializerMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.GENERIC_METHOD_ANNOTATED_INJECT, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.GENERIC_METHOD_ANNOTATED_INJECT, 7);
}
/**
@@ -916,7 +917,7 @@
*/
public void testNamedInjectPoint() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/NamedInjectionBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME,
10, 16);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME, 10, 16);
}
/**
@@ -927,8 +928,8 @@
*/
public void testBeanDoesNotHaveSomeTypeOfSpecializedBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/MissingTypeBeanBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN,
"MissingTypeBeanBroken", "Farmer", "Farmer"), 6);
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN,
"MissingTypeBeanBroken", "Farmer", "Simple"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN,
"MissingTypeBeanBroken", "Farmer", "Farmer"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN,
"MissingTypeBeanBroken", "Farmer", "Simple"), 6);
}
/**
@@ -939,7 +940,7 @@
*/
public void testSpecializingAndSpecializedBeanHasName() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.CONFLICTING_NAME_IN_SPECIALIZING_BEAN,
"HighSchool_Broken.getStarPupil()", "School.getStarPupil()"), 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.CONFLICTING_NAME_IN_SPECIALIZING_BEAN,
"HighSchool_Broken.getStarPupil()", "School.getStarPupil()"), 25);
}
/**
@@ -950,7 +951,7 @@
*/
public void testSpecializingInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/SpecializingInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES,
9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES, 9);
}
/**
@@ -961,7 +962,7 @@
*/
public void testSpecializingDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/SpecializingDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES,
10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES, 10);
}
/**
@@ -972,7 +973,7 @@
*/
public void testDecoratorNotResolved() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INJECTED_DECORATOR, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INJECTED_DECORATOR, 23);
}
/**
@@ -983,7 +984,7 @@
*/
public void testInterceptorNotResolved() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InjectInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INJECTED_INTERCEPTOR, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INJECTED_INTERCEPTOR, 7);
}
/**
@@ -994,7 +995,7 @@
*/
public void testTypeVariableInjectionPoint() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/FarmBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, 11, 15);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, 11, 15);
}
/**
@@ -1005,7 +1006,7 @@
*/
public void testAnnotationMemberWithoutNonBinding() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/binding/members/annotation/Expensive_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER,
35);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER,
35);
}
/**
@@ -1016,7 +1017,7 @@
*/
public void testArrayMemberWithoutNonBinding() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/binding/members/array/Expensive_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, 34);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, 34);
}
/**
@@ -1027,7 +1028,7 @@
*/
public void testSessionScopedBeanWithInjectionPoint() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/normal/scope/Cat_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 27);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 27);
}
/**
@@ -1038,7 +1039,7 @@
*/
public void testMultipleDelegateInjectionPoints() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/TimestampLogger.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DELEGATE, 31, 32);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_DELEGATE, 31, 32);
}
/**
@@ -1049,9 +1050,9 @@
*/
public void testNoDelegateInjectionPoints() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/TimestampLogger.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MISSING_DELEGATE, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_DELEGATE, 25);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_DELEGATE);
}
/**
@@ -1062,13 +1063,13 @@
*/
public void testDecoratorDelegateInjectionPoints() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateConstructor/TimestampLogger.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/broken/delegateProducerMethod/TimestampLogger.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE,
33);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE, 33);
}
/**
@@ -1079,13 +1080,13 @@
*/
public void testNonDecoratorWithDecoratesAnnotationNotOK() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/nonDecoratorWithDecorates/Elf.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE,
24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE, 24);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateConstructor/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
}
/**
@@ -1096,7 +1097,7 @@
*/
public void testNotAllDecoratedTypesImplemented() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/TimestampLogger.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"), 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"), 31);
}
/**
@@ -1107,21 +1108,21 @@
*/
public void testAllDecoratedTypesImplemented() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLogger.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"TimestampLogger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"MockLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"TimestampLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"MockLogger"));
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerWithMethod.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"TimestampLogger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"MockLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"EnhancedLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"TimestampLogger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"MockLogger"));
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/FooDecorator.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE.substring(0, 60) + ".*");
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE.substring(0, 60) + ".*");
}
/**
@@ -1132,7 +1133,7 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterInInterfcaeInFiled() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"IClazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"IClazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
}
/**
@@ -1143,7 +1144,7 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterInInterfcaeInMethod() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampWithMethodBroken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"IClazz<java.lang.String>"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"IClazz<java.lang.String>"), 10);
}
/**
@@ -1157,7 +1158,7 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterWithInterfaceInFiled() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
}
/**
@@ -1171,7 +1172,7 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterWithInterfaceInMethod() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerWithMethodOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"), 10);
}
/**
@@ -1185,13 +1186,13 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterInFiled() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"), 10);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLogger.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
}
/**
@@ -1204,13 +1205,13 @@
*/
public void testDelegateSpecifiesDifferentTypeParameterInMethod() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerWithMethodOk.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"),
10);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerWithMethod.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Logger"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Clazz<java.lang.String>"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE,
"Object"));
}
/**
@@ -1221,10 +1222,10 @@
*/
public void testNoInterceptorBinfdingsInInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NoInterceptorBinfdingsInInterceptor.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_INTERCEPTOR_BINDING, 7);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/SecureTransaction.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_INTERCEPTOR_BINDING);
}
/**
@@ -1236,7 +1237,7 @@
*/
public void testInterceptorBinfdingsInInterceptorWithPreDestroyBroken() throws Exception
{
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithPreDestroyBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
}
/**
@@ -1248,7 +1249,7 @@
*/
public void testInterceptorBinfdingsInInterceptorWithPostConstructBroken() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithPostConstructorBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
}
/**
@@ -1259,9 +1260,9 @@
*/
public void testInterceptorBinfdingsInInterceptorWithLifeCycleMethodOk() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithLifeCycleMethodOk.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/CatInterceptor.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
}
/**
@@ -1272,7 +1273,7 @@
*/
public void testClassLevelInterceptorBindingWithFinalMethodBroken() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD,
6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
}
/**
@@ -1283,7 +1284,7 @@
*/
public void testClassWithMethodLevelInterceptorBindingWithFinalMethodBroken() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD,
6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
}
/**
@@ -1294,7 +1295,7 @@
*/
public void testFinalClassWithClassLevelInterceptorBindingBroken() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS,
4);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 4);
}
/**
@@ -1305,7 +1306,7 @@
*/
public void testFinalClassWithMethodLevelInterceptorBindingBroken() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS,
3);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 3);
}
/**
@@ -1316,8 +1317,8 @@
*/
public void testClassLevelInterceptorBindingOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
}
/**
@@ -1328,8 +1329,8 @@
*/
public void testClassWithMethodLevelInterceptorBindingOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java");
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
}
/**
@@ -1343,9 +1344,9 @@
*/
public void testInterceptorBindingsWithConflictingAnnotationMembersNotOk() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/Foo.java");
-// assertMarkerIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS,
19, 20);
+// AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 19, 20);
//At present CDICoreValidator puts marker to class name
- assertMarkerIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS,
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 21);
}
/**
@@ -1356,8 +1357,8 @@
*/
public void testAnnotationTypeMemberWithoutNonBindingInInterceptorByndingType() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
19);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
20);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
19);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
20);
}
/**
@@ -1368,8 +1369,8 @@
*/
public void testArrayTypeMemberWithoutNonBindingInInterceptorByndingType() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
21);
- assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
22);
}
/**
@@ -1380,7 +1381,7 @@
*/
public void testObserverMethodMustHaveOnlyOneEventParameter() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/tooManyParameters/YorkshireTerrier_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, 24,
24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, 24, 24);
}
/**
@@ -1391,7 +1392,7 @@
*/
public void testObserverMethodAnnotatedProducesFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 25);
}
/**
@@ -1402,7 +1403,7 @@
*/
public void testObserverMethodAnnotatedInitializerFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_ANNOTATED_INJECT, 25, 26);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_ANNOTATED_INJECT, 25, 26);
}
/**
@@ -1413,7 +1414,7 @@
*/
public void testObserverMethodWithDisposesParamFails() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 28, 28);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 28, 28);
}
/**
@@ -1425,7 +1426,7 @@
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_OBSERVER_IN_SESSION_BEAN, new
String[]{"observeSomeEvent", "TibetanTerrier_Broken"});
- assertMarkerIsCreated(file, bindedErrorMessage, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 25);
}
/**
@@ -1438,7 +1439,7 @@
public void testObserverMethodOnSingletonBeanIsBusinessMethodOk() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/observers/ClassFragmentLogger.java");
String bindedErrorMessage =
NLS.bind(CDIValidationMessages.ILLEGAL_OBSERVER_IN_SESSION_BEAN, new
String[]{"addEntry", "ClassFragmentLogger"});
- assertMarkerIsNotCreated(file, bindedErrorMessage, 21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 21);
}
/**
@@ -1449,7 +1450,7 @@
*/
public void testObserverMethodInInterceptor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ObserverMethodInInterceptorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_IN_INTERCEPTOR, 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_IN_INTERCEPTOR, 10);
}
/**
@@ -1460,7 +1461,7 @@
*/
public void testObserverMethodInDecorator() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/ObserverMethodInDecoratorBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_IN_DECORATOR, 14);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.OBSERVER_IN_DECORATOR, 14);
}
/**
@@ -1471,6 +1472,6 @@
*/
public void testDependentBeanWithConditionalObserverMethodIsDefinitionError() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/dependentIsConditionalObserver/AlarmSystem.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DependentProjectValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DependentProjectValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DependentProjectValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -23,6 +23,7 @@
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -67,13 +68,13 @@
JobUtils.waitForIdle();
IFile testBean3 = project3.getFile("src/cdi/test3/TestBean3.java");
- assertMarkerIsNotCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
IFile testBean4 = project4.getFile("src/cdi/test4/TestBean4.java");
- assertMarkerIsNotCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
IFile testBean5 = project5.getFile("src/cdi/test5/TestBean5.java");
- assertMarkerIsNotCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
IFile scope = project2.getFile(new Path("src/test/TestScope.java"));
IFile normalScope = project2.getFile(new
Path("src/test/TestNormalScope.validation"));
@@ -83,13 +84,13 @@
JobUtils.waitForIdle(1000);
testBean3 = project3.getFile("src/cdi/test3/TestBean3.java");
- assertMarkerIsCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
testBean4 = project4.getFile("src/cdi/test4/TestBean4.java");
- assertMarkerIsCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
testBean5 = project5.getFile("src/cdi/test5/TestBean5.java");
- assertMarkerIsCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
normalScope = project2.getFile(new Path("src/test/TestScope.java"));
scope = project2.getFile(new Path("src/test/TestScope.validation"));
@@ -99,13 +100,13 @@
JobUtils.waitForIdle(1000);
testBean3 = project3.getFile("src/cdi/test3/TestBean3.java");
- assertMarkerIsNotCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean3,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean3.foo()"), 10);
testBean4 = project4.getFile("src/cdi/test4/TestBean4.java");
- assertMarkerIsNotCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean4,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "TestBean4.foo()"), 10);
testBean5 = project5.getFile("src/cdi/test5/TestBean5.java");
- assertMarkerIsNotCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testBean5,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "TestBean5.foo()"), 10);
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
JobUtils.waitForIdle();
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -19,6 +19,7 @@
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -34,9 +35,9 @@
*/
public void testInconsistentSpecialization() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/inconsistent/Maid.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.INCONSISTENT_SPECIALIZATION, "Maid,
Manager", "Employee"), 21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.INCONSISTENT_SPECIALIZATION, "Maid,
Manager", "Employee"), 21);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/inconsistent/Manager.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.INCONSISTENT_SPECIALIZATION, "Manager,
Maid", "Employee"), 21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.INCONSISTENT_SPECIALIZATION, "Manager,
Maid", "Employee"), 21);
}
/**
@@ -47,9 +48,9 @@
*/
public void testAmbiguousDependency() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/Farm_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 25);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 34);
}
/**
@@ -60,9 +61,9 @@
*/
public void testUnsatisfiedDependency() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/unsatisfied/Bean_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 25);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS,
34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 34);
}
/**
@@ -73,8 +74,8 @@
*/
public void testAmbiguousDependencyForInstance() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/InjectionInstance.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 8);
- assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 11);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 8);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 11);
}
/**
@@ -85,8 +86,8 @@
*/
public void testUnsatisfiedDependencyForInstance() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/InjectionInstance.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 9);
- assertMarkerIsCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 12);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 12);
}
/**
@@ -96,9 +97,9 @@
*/
public void testBeansWithDefaultCounstructor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java");
- assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 12);
- assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS,
12);
- assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 12);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 12);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 15);
}
/**
@@ -109,13 +110,13 @@
*/
public void testPrimitiveInjectionPointResolvedToNonPrimitiveProducerMethod() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/GameBroken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 7,
19);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
9);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
10);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
11);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
20);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
21);
- assertMarkerIsNotCreated(file, CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN,
22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 7, 19);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 10);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 11);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 20);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.INJECT_RESOLVES_TO_NULLABLE_BEAN, 22);
}
/**
@@ -128,9 +129,9 @@
*/
public void testInjectionPointWithArrayType() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/unproxyable/InjectionPointBean_Broken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType[]", "ArrayProducer.produce()"), 6);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType", "TestType"), 7);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType[]", "ArrayProducer.produce2()"), 8);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType[]", "ArrayProducer.produce()"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType", "TestType"), 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE,
"TestType[]", "ArrayProducer.produce2()"), 8);
}
/**
@@ -143,10 +144,10 @@
*/
public void testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedBean()
throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/unproxyable/Number_Broken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "NumberProducer.produce()"), 9);
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"long", "NumberProducer.foo"), 13);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"Short", "NumberProducer.foo2"), 17);
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "NumberProducer.foo3"), 21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"int", "NumberProducer.produce()"), 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"long", "NumberProducer.foo"), 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"Short", "NumberProducer.foo2"), 17);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE,
"boolean", "NumberProducer.foo3"), 21);
}
/**
@@ -159,7 +160,7 @@
*/
public void testClassWithPrivateConstructor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC,
"Unproxyable_Broken", "Unproxyable_Broken"), 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC,
"Unproxyable_Broken", "Unproxyable_Broken"), 23);
}
/**
@@ -168,7 +169,7 @@
*/
public void testClassWithDefaultConstructor() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/unproxyable/Number_Broken.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC,
"BeanWithDefaultConsturctor", "BeanWithDefaultConsturctor"), 24);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC,
"BeanWithDefaultConsturctor", "BeanWithDefaultConsturctor"), 24);
}
/**
@@ -181,7 +182,7 @@
*/
public void testInjectionPointWhichResolvesToNormalScopedFinalBean() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE,
"Tuna_Broken", "Tuna_Broken"), 24);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE,
"Tuna_Broken", "Tuna_Broken"), 24);
}
/**
@@ -194,7 +195,7 @@
*/
public void testClassWithFinalMethodCannotBeProxied() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM,
"Tuna_Broken", "Tuna_Broken"), 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM,
"Tuna_Broken", "Tuna_Broken"), 23);
}
/**
@@ -207,9 +208,9 @@
*/
public void testDuplicateNamedBeans() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/Cod.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "Cod, Sole"),
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "Cod, Sole"),
21);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/Sole.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "Sole, Cod"),
21);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "Sole, Cod"),
21);
}
/**
@@ -220,7 +221,7 @@
*/
public void testDuplicateBeanNamePrefix() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/byname/duplicatePrefixResolution/ExampleWebsite_Broken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNRESOLVABLE_EL_NAME, "example.com",
"com", "example", "Example"), 22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.UNRESOLVABLE_EL_NAME, "example.com",
"com", "example", "Example"), 22);
}
/**
@@ -232,7 +233,7 @@
*/
public void testAppliesToFinalManagedBeanClass() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/TimestampLogger.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_CLASS,
"MockLogger"), 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_CLASS,
"MockLogger"), 31);
}
/**
@@ -244,7 +245,7 @@
*/
public void testAppliesToFinalMethodOnManagedBeanClass() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_METHOD,
"MockLogger", "log(String string)"), 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_METHOD,
"MockLogger", "log(String string)"), 31);
}
/**
@@ -256,8 +257,8 @@
JobUtils.waitForIdle();
IFile testInjection =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java");
- assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
- assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
IFile testBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java");
IFile testBeanImpl =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation");
@@ -266,7 +267,7 @@
tckProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new
NullProgressMonitor());
JobUtils.waitForIdle(1000);
- assertMarkerIsCreated(testInjection, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS,
7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(testInjection,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
testBeanImpl =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java");
testBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation");
@@ -275,8 +276,8 @@
tckProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new
NullProgressMonitor());
JobUtils.waitForIdle(1000);
- assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
- assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(testInjection,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
JobUtils.waitForIdle();
@@ -291,6 +292,6 @@
*/
public void testSimpleWebBeanWithNonSerializableImplementationClassFails() throws
Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/context/passivating/broken/nonPassivationCapableManagedBeanHasPassivatingScope/Hamina_Broken.java");
- assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN,
"Hamina_Broken", "SessionScoped"), 22);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN,
"Hamina_Broken", "SessionScoped"), 22);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ELValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ELValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ELValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -18,6 +18,7 @@
import org.jboss.tools.jst.web.kb.internal.validation.ELValidationMessages;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -30,9 +31,9 @@
try {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/TestBean.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
file = tckProject.getFile("WebContent/elValidation.xhtml");
- assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
IFile namedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NamedBean.java");
IFile newNamedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NewNamedBean.validation");
@@ -42,9 +43,9 @@
JobUtils.waitForIdle(1000);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/TestBean.java");
- assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
file = tckProject.getFile("WebContent/elValidation.xhtml");
- assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
newNamedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NamedBean.java");
namedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NamedBean.validation");
@@ -54,9 +55,9 @@
JobUtils.waitForIdle(1000);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/TestBean.java");
- assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 6);
file = tckProject.getFile("WebContent/elValidation.xhtml");
- assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"foo"), 9);
} finally {
IFile newNamedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NamedBean.java");
IFile namedBean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/NamedBean.validation");
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -12,13 +12,10 @@
import java.util.List;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.jst.web.kb.internal.validation.ValidationContext;
import org.jboss.tools.jst.web.kb.validation.IValidator;
-import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -35,33 +32,4 @@
}
return null;
}
-
- public static int getMarkersNumber(IResource resource) {
- return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
- }
-
- public static void assertMarkerIsCreated(IResource resource, String pattern, int...
expectedLines) throws CoreException {
- assertMarkerIsCreated(resource, pattern, true, expectedLines);
- }
-
- public static void assertMarkerIsCreated(IResource resource, String message, boolean
pattern, int... expectedLines) throws CoreException {
- AbstractResourceMarkerTest.assertMarkerIsCreated(resource,
AbstractResourceMarkerTest.MARKER_TYPE, pattern?convertMessageToPatern(message):message,
pattern, expectedLines);
- }
-
- public static void assertMarkerIsNotCreated(IResource resource, String message) throws
CoreException {
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(resource,
AbstractResourceMarkerTest.MARKER_TYPE, convertMessageToPatern(message));
- }
-
- public static void assertMarkerIsNotCreated(IResource resource, String message, int
expectedLine) throws CoreException {
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(resource,
AbstractResourceMarkerTest.MARKER_TYPE, convertMessageToPatern(message), expectedLine);
- }
-
- public static void assertMarkerIsCreatedForGivenPosition(IResource resource, String
message, int lineNumber, int startPosition, int endPosition) throws CoreException {
- AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(resource,
AbstractResourceMarkerTest.MARKER_TYPE, convertMessageToPatern(message), lineNumber,
startPosition, endPosition);
- }
-
- public static String convertMessageToPatern(String message) {
- return message.replace("[", "\\[").replace("]",
"\\]").replace("<", "\\<").replace(">",
"\\>").replace("(", "\\(").replace(")",
"\\)")
- .replace("{", "\\{").replace("}",
"\\}").replace("'", "\\'");
- }
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF 2011-05-26
00:32:38 UTC (rev 31503)
@@ -20,7 +20,6 @@
org.jboss.tools.jst.web.kb,
org.jboss.tools.cdi.xml,
org.jboss.tools.cdi.seam.solder.core,
- org.eclipse.jst.standard.schemas,
- org.jboss.tools.cdi.core.test
+ org.eclipse.jst.standard.schemas
Export-Package: org.jboss.tools.cdi.seam.config.core.test
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -20,9 +20,9 @@
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.test.tck.validation.ValidationTest;
import org.jboss.tools.cdi.seam.config.core.validation.SeamConfigValidationMessages;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
*
@@ -65,30 +65,30 @@
}
public void testBeanResolution() throws CoreException {
- ValidationTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE, "v:MyBean2"),
8);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE,
"v:MyBean1"));
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE, "v:MyBean2"),
8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE,
"v:MyBean1"));
}
public void testFieldResolution() throws CoreException {
- ValidationTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "param"),
21);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "value"),
28);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "param"),
21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "value"),
28);
}
public void testMethodResolution() throws CoreException {
//It is unresolved member because no member with that name is found.
- ValidationTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method2"), 38);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method2"), 38);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 34);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 34);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 42);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 42);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 42);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 42);
- ValidationTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 47);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 47);
}
public void testAnnotationMemberResolution() throws CoreException {
- ValidationTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field3"), 15);
- ValidationTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field1"));
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field3"), 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field1"));
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-05-26
00:32:38 UTC (rev 31503)
@@ -11,5 +11,4 @@
org.eclipse.core.resources;bundle-version="3.7.100",
org.jboss.tools.tests,
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.jboss.tools.cdi.core,
- org.jboss.tools.cdi.core.test
+ org.jboss.tools.cdi.core
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -15,8 +15,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.jboss.tools.cdi.core.test.tck.validation.ValidationTest;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -34,12 +34,12 @@
public void testInjectionAnnotatedInputField() throws Exception {
IFile file =
project.getFile("src/org/jboss/beans/validation/test/Validation.java");
- ValidationTest.assertMarkerIsCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 18, 23);
- ValidationTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 20, 28);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 18, 23);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 20, 28);
- ValidationTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 9);
- ValidationTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 11);
- ValidationTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 14);
- ValidationTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 14);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 11);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 14);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 14);
}
}
\ No newline at end of file
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2011-05-26
00:12:43 UTC (rev 31502)
+++
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2011-05-26
00:32:38 UTC (rev 31503)
@@ -376,4 +376,29 @@
this.pattern = pattern;
}
}
+
+ public static void assertMarkerIsCreated(IResource resource, String pattern, int...
expectedLines) throws CoreException {
+ assertMarkerIsCreated(resource, pattern, true, expectedLines);
+ }
+
+ public static void assertMarkerIsCreated(IResource resource, String message, boolean
pattern, int... expectedLines) throws CoreException {
+ assertMarkerIsCreated(resource, AbstractResourceMarkerTest.MARKER_TYPE,
pattern?convertMessageToPatern(message):message, pattern, expectedLines);
+ }
+
+ public static void assertMarkerIsNotCreated(IResource resource, String message) throws
CoreException {
+ assertMarkerIsNotCreated(resource, AbstractResourceMarkerTest.MARKER_TYPE,
convertMessageToPatern(message));
+ }
+
+ public static void assertMarkerIsNotCreated(IResource resource, String message, int
expectedLine) throws CoreException {
+ assertMarkerIsNotCreated(resource, AbstractResourceMarkerTest.MARKER_TYPE,
convertMessageToPatern(message), expectedLine);
+ }
+
+ public static void assertMarkerIsCreatedForGivenPosition(IResource resource, String
message, int lineNumber, int startPosition, int endPosition) throws CoreException {
+ assertMarkerIsCreatedForGivenPosition(resource, AbstractResourceMarkerTest.MARKER_TYPE,
convertMessageToPatern(message), lineNumber, startPosition, endPosition);
+ }
+
+ public static String convertMessageToPatern(String message) {
+ return message.replace("[", "\\[").replace("]",
"\\]").replace("<", "\\<").replace(">",
"\\>").replace("(", "\\(").replace(")",
"\\)")
+ .replace("{", "\\{").replace("}",
"\\}").replace("'", "\\'");
+ }
}
\ No newline at end of file