Author: akazakov
Date: 2011-12-13 15:34:57 -0500 (Tue, 13 Dec 2011)
New Revision: 37295
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10187 Add support for a @SuppressWarnings
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-13
20:03:24 UTC (rev 37294)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-13
20:34:57 UTC (rev 37295)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.cdi.core.test.tck.validation;
+import java.text.MessageFormat;
+
import org.eclipse.core.resources.IFile;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -22,18 +24,18 @@
public void testClass() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/Fish.java");
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLCICATE_EL_NAME, 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "*"), 8);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLCICATE_EL_NAME, 7);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "*"), 7);
}
public void testFieldWithSuppressInParentElement() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/Fish.java");
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.DUPLCICATE_EL_NAME, 13);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "*"), 13);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLCICATE_EL_NAME, 12);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(CDIValidationMessages.DUPLCICATE_EL_NAME, "*"), 12);
}
public void testField() throws Exception {
@@ -42,7 +44,7 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 19);
file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 15, 17);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 15, 17, 23);
}
public void testParam() throws Exception {