[jbosstools-commits] JBoss Tools SVN: r43673 - in trunk/cdi/tests: org.jboss.tools.cdi.seam.solder.core.test and 2 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 13 20:17:31 EDT 2012


Author: akazakov
Date: 2012-09-13 20:17:30 -0400 (Thu, 13 Sep 2012)
New Revision: 43673

Added:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AbstractValidationTest.java
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/AYTSeamServletValidationTest.java
Removed:
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/
Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamServletValidationTest.java
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
Log:
https://issues.jboss.org/browse/JBIDE-12601 CDI as-you-type validator should not validate injections which use supported CDI extensions and ignored by the build CDI validator.

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AbstractValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AbstractValidationTest.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AbstractValidationTest.java	2012-09-14 00:17:30 UTC (rev 43673)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck.validation;
+
+import junit.framework.TestCase;
+
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+import org.jboss.tools.tests.IAnnotationTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public abstract class AbstractValidationTest extends TestCase {
+
+	private IAnnotationTest annotationTest = new AbstractResourceMarkerTest();
+
+	protected IAnnotationTest getAnnotationTest() {
+		return annotationTest;
+	}
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AbstractValidationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java	2012-09-14 00:11:39 UTC (rev 43672)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java	2012-09-14 00:17:30 UTC (rev 43673)
@@ -15,6 +15,7 @@
 
 import org.eclipse.jdt.internal.core.JavaModelManager;
 import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.seam.solder.core.test.aytvalidation.AYTSeamServletValidationTest;
 import org.jboss.tools.cdi.seam.solder.core.test.v30.CDISeamSolderCoreAllTests30;
 import org.jboss.tools.common.base.test.validation.ValidationExceptionTest;
 /**
@@ -49,6 +50,7 @@
 		suite31.addTestSuite(DefaultBeanValidationTest.class);
 		suite31.addTestSuite(UnwrapsTest.class);
 		suite31.addTestSuite(SeamServletValidationTest.class);
+		suite31.addTestSuite(AYTSeamServletValidationTest.class);
 
 		suiteAll.addTest(suite);
 

Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamServletValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamServletValidationTest.java	2012-09-14 00:11:39 UTC (rev 43672)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamServletValidationTest.java	2012-09-14 00:17:30 UTC (rev 43673)
@@ -12,7 +12,6 @@
 
 import org.eclipse.core.resources.IFile;
 import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
-import org.jboss.tools.tests.AbstractResourceMarkerTest;
 
 /**
  * @author Alexey Kazakov
@@ -27,11 +26,11 @@
 	public void testInjectionValidationForField() throws Exception {
 		IFile file = getTestProject().getFile("src/org/jboss/servlet/Validation.java");
 		for (int i = 12; i < 30; i++) {
-			AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, i);
-			AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, i);
+			getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, i);
+			getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, i);
 		}
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 40, 42);
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 41, 43);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 40, 42);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 41, 43);
 	}
 
 	/**
@@ -42,8 +41,8 @@
 	public void testInjectionValidationForParam() throws Exception {
 		IFile file = getTestProject().getFile("src/org/jboss/servlet/Validation.java");
 		for (int i = 30; i < 39; i++) {
-			AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, i);
-			AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, i);
+			getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, i);
+			getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, i);
 		}
 	}
 }
\ No newline at end of file

Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java	2012-09-14 00:11:39 UTC (rev 43672)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java	2012-09-14 00:17:30 UTC (rev 43673)
@@ -10,21 +10,20 @@
  ******************************************************************************/ 
 package org.jboss.tools.cdi.seam.solder.core.test;
 
-import junit.framework.TestCase;
-
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.jboss.tools.cdi.core.CDICorePlugin;
 import org.jboss.tools.cdi.core.ICDIProject;
 import org.jboss.tools.cdi.core.IInjectionPointField;
 import org.jboss.tools.cdi.core.test.DependentProjectTest;
+import org.jboss.tools.cdi.core.test.tck.validation.AbstractValidationTest;
 
 /**
  * 
  * @author Viacheslav Kabanovich
  *
  */
-public class SeamSolderTest extends TestCase {
+public class SeamSolderTest extends AbstractValidationTest {
 	protected static String PLUGIN_ID = "org.jboss.tools.cdi.seam.solder.core.test";
 	protected static String PROJECT_NAME = "CDISolderTest";
 	protected static String PROJECT_PATH = "/projects/CDISolderTest";

Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/AYTSeamServletValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/AYTSeamServletValidationTest.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/AYTSeamServletValidationTest.java	2012-09-14 00:17:30 UTC (rev 43673)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.solder.core.test.aytvalidation;
+
+import org.jboss.tools.cdi.core.test.tck.validation.CDIAnnotationTest;
+import org.jboss.tools.cdi.seam.solder.core.test.SeamServletValidationTest;
+import org.jboss.tools.tests.IAnnotationTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class AYTSeamServletValidationTest extends SeamServletValidationTest {
+
+	private CDIAnnotationTest annotationTest = new CDIAnnotationTest();
+
+	@Override
+	protected IAnnotationTest getAnnotationTest() {
+		return annotationTest;
+	}
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/aytvalidation/AYTSeamServletValidationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain



More information about the jbosstools-commits mailing list