Author: akazakov
Date: 2010-05-19 12:39:54 -0400 (Wed, 19 May 2010)
New Revision: 22203
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ProducerMethodDefinitionTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java
Log:
https://jira.jboss.org/browse/JBIDE-5808
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-05-19
16:15:55 UTC (rev 22202)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-05-19
16:39:54 UTC (rev 22203)
@@ -19,6 +19,7 @@
import org.jboss.tools.cdi.core.test.tck.EnterpriseScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseStereotypeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.NameDefinitionTest;
+import org.jboss.tools.cdi.core.test.tck.ProducerMethodDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.QualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.StereotypeDefinitionTest;
@@ -42,6 +43,7 @@
suite.addTestSuite(DefaultNamedTest.class);
suite.addTestSuite(EnterpriseStereotypeDefinitionTest.class);
suite.addTestSuite(StereotypeInheritenceTest.class);
+ suite.addTestSuite(ProducerMethodDefinitionTest.class);
suite.addTestSuite(ValidationTest.class);
return suite;
}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ProducerMethodDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ProducerMethodDefinitionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ProducerMethodDefinitionTest.java 2010-05-19
16:39:54 UTC (rev 22203)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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;
+
+import java.util.Set;
+
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class ProducerMethodDefinitionTest extends TCKTest {
+
+ /**
+ * Section 3.3.2 - Declaring a producer method
+ * i) All producer method parameters are injection points.
+ *
+ * @throws JavaModelException
+ */
+ public void testBindingTypesAppliedToProducerMethodParameters() throws
JavaModelException {
+ Set<IBean> beans = cdiProject.getBeans(true,
"org.jboss.jsr299.tck.tests.implementation.producer.method.definition.Tarantula",
"org.jboss.jsr299.tck.tests.implementation.producer.method.definition.Deadliest");
+ IBean bean = beans.iterator().next();
+ Set<IInjectionPoint> injections = bean.getInjectionPoints();
+ assertEquals("Wrong number of injection points in the producer.", 2,
injections.size());
+ // TODO use real location for injection points.
+ assertLocationEquals(injections, 0, 0);
+ assertLocationEquals(injections, 0, 0);
+ }
+
+ // TODO continue implementing producer tests.
+}
\ 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/ProducerMethodDefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain