[jbosstools-commits] JBoss Tools SVN: r22612 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Jun 7 14:55:34 EDT 2010


Author: akazakov
Date: 2010-06-07 14:55:33 -0400 (Mon, 07 Jun 2010)
New Revision: 22612

Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6418

Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java	2010-06-07 18:09:50 UTC (rev 22611)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java	2010-06-07 18:55:33 UTC (rev 22612)
@@ -16,6 +16,7 @@
 import org.eclipse.jdt.core.IType;
 import org.jboss.tools.cdi.core.IBean;
 import org.jboss.tools.cdi.core.IParametedType;
+import org.jboss.tools.cdi.core.IProducerMethod;
 import org.jboss.tools.cdi.core.IQualifierDeclaration;
 import org.jboss.tools.common.EclipseUtil;
 import org.jboss.tools.common.model.util.EclipseJavaUtil;
@@ -81,6 +82,20 @@
 
 	/**
 	 * Section 5.2 - Typesafe resolution
+	 *   j) Test with an array type.
+	 *   
+	 * @throws CoreException 
+	 */
+	public void testResolveByTypeWithArray() throws CoreException {
+		IType type = EclipseJavaUtil.findType(EclipseUtil.getJavaProject(cdiProject.getNature().getProject()), "org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.SpiderProducer");
+		IParametedType parametedType = cdiProject.getNature().getTypeFactory().getParametedType(type, "[QSpider;");
+		Set<IBean> beans = cdiProject.getBeans(true, parametedType, new IQualifierDeclaration[0]);
+		assertEquals("Wrong number of the beans", 1, beans.size());
+		assertTrue("The bean should be a producer method.", beans.iterator().next() instanceof IProducerMethod);
+	}
+
+	/**
+	 * Section 5.2 - Typesafe resolution
 	 *   ld) Test with matching beans with matching qualifier with same annotation member value for each member which is not annotated @javax.enterprise.util.NonBinding.
 	 *   
 	 * @throws CoreException 



More information about the jbosstools-commits mailing list