Author: akazakov
Date: 2010-03-10 07:48:01 -0500 (Wed, 10 Mar 2010)
New Revision: 20728
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NameDefinitionTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
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/tck/BeanDefinitionTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5808
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-03-10
12:39:27 UTC (rev 20727)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-03-10
12:48:01 UTC (rev 20728)
@@ -15,9 +15,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IType;
-import org.jboss.tools.cdi.internal.core.impl.InterceptorBindingElement;
-import org.jboss.tools.cdi.internal.core.impl.QualifierElement;
-import org.jboss.tools.cdi.internal.core.impl.ScopeElement;
import org.jboss.tools.common.text.INodeReference;
/**
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-03-10
12:39:27 UTC (rev 20727)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-03-10
12:48:01 UTC (rev 20728)
@@ -14,6 +14,7 @@
import junit.framework.TestSuite;
import org.jboss.tools.cdi.core.test.tck.BeanDefinitionTest;
+import org.jboss.tools.cdi.core.test.tck.NameDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.ValidationTest;
/**
@@ -24,6 +25,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("CDI Core Tests");
suite.addTestSuite(BeanDefinitionTest.class);
+ suite.addTestSuite(NameDefinitionTest.class);
suite.addTestSuite(ValidationTest.class);
return suite;
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-03-10
12:39:27 UTC (rev 20727)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-03-10
12:48:01 UTC (rev 20728)
@@ -208,27 +208,4 @@
IBean bean = beans.iterator().next();
assertEquals("Wrong Bean Class type of
org.jboss.jsr299.tck.tests.definition.bean.Horse bean",
"org.jboss.jsr299.tck.tests.definition.bean.Horse",
bean.getBeanClass().getFullyQualifiedName());
}
-
- /**
- * e) A bean comprises of an optional bean EL name.
- */
- public void testNonDefaultNamed() {
- IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/name/Moose.java");
- Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
- assertEquals("org.jboss.jsr299.tck.tests.definition.name.Moose should have the
only bean.", 1, beans.size());
- IBean bean = beans.iterator().next();
- assertEquals("Wrong EL name of org.jboss.jsr299.tck.tests.definition.name.Moose
bean.", "aMoose", bean.getName());
- assertLocationEquals(bean.getNameLocation(), 918, 16);
- }
-
- /**
- * e) A bean comprises of an optional bean EL name (continue).
- */
- public void testNotNamedInJava() {
- IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/name/SeaBass.java");
- Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
- assertEquals("org.jboss.jsr299.tck.tests.definition.name.SeaBass should have the
only bean.", 1, beans.size());
- IBean bean = beans.iterator().next();
- assertNull("org.jboss.jsr299.tck.tests.definition.name.Moose bean should not have
any EL name.", bean.getName());
- }
}
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NameDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NameDefinitionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NameDefinitionTest.java 2010-03-10
12:48:01 UTC (rev 20728)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class NameDefinitionTest extends TCKTest {
+
+ /**
+ * Section 2 - Concepts
+ * e) A bean comprises of an optional bean EL name.
+ *
+ * @throws JavaModelException
+ */
+ public void testNonDefaultNamed() throws JavaModelException {
+// IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/name/Moose.java");
+// Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.name.Moose");
+ assertEquals("org.jboss.jsr299.tck.tests.definition.name.Moose should have the
only bean.", 1, beans.size());
+ IBean bean = beans.iterator().next();
+ assertEquals("Wrong EL name of org.jboss.jsr299.tck.tests.definition.name.Moose
bean.", "aMoose", bean.getName());
+ assertLocationEquals(bean.getNameLocation(), 918, 16);
+ }
+
+ /**
+ * Section 2 - Concepts
+ * e) A bean comprises of an optional bean EL name (continue).
+ *
+ * @throws JavaModelException
+ */
+ public void testNotNamedInJava() throws JavaModelException {
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.name.SeaBass");
+ assertEquals("org.jboss.jsr299.tck.tests.definition.name.SeaBass should have the
only bean.", 1, beans.size());
+ IBean bean = beans.iterator().next();
+ assertNull("org.jboss.jsr299.tck.tests.definition.name.SeaBass bean should not
have any EL name.", bean.getName());
+ }
+}
\ 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/NameDefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain