Author: scabanovich
Date: 2011-07-28 18:14:27 -0400 (Thu, 28 Jul 2011)
New Revision: 33327
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java
Log:
JBIDE-9401
https://issues.jboss.org/browse/JBIDE-9401
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-07-28
22:14:14 UTC (rev 33326)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-07-28
22:14:27 UTC (rev 33327)
@@ -112,7 +112,6 @@
suiteAll.addTestSuite(RemoveJarFromClasspathTest.class);
suiteAll.addTestSuite(ExtensionFactoryTest.class);
suiteAll.addTestSuite(ExtensionManagerTest.class);
- suiteAll.addTestSuite(WeldJarTest.class);
suiteAll.addTestSuite(BeansXMLTest.class);
TestSuite dependentSuite = new TestSuite("Dependent Projects Tests");
dependentSuite.addTestSuite(DependentProjectTest.class);
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-07-28
22:14:14 UTC (rev 33326)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-07-28
22:14:27 UTC (rev 33327)
@@ -1,69 +0,0 @@
-package org.jboss.tools.cdi.core.test;
-
-import java.io.IOException;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.IBean;
-import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.IInjectionPoint;
-import org.jboss.tools.test.util.JobUtils;
-import org.jboss.tools.test.util.ResourcesUtils;
-
-/**
- *
- * @author V.Kabanovich
- *
- */
-public class WeldJarTest extends TestCase {
- protected static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
- IProject project1 = null;
-
- public WeldJarTest() {}
-
- public void setUp() throws Exception {
- project1 = ResourcesUtils.importProject(PLUGIN_ID, "/projects/CDITest1");
- JobUtils.waitForIdle();
- project1.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
- }
-
- public void testWeldJar() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project1, true);
- Set<IBean> bs = cdi.getBeans(new
Path("/CDITest1/src/cdi/test/MyShellImpl.java"));
- assertFalse(bs.isEmpty());
- IBean b = bs.iterator().next();
- Set<IInjectionPoint> ps = b.getInjectionPoints();
- IInjectionPoint p = ps.iterator().next();
- Set<IBean> inbs = cdi.getBeans(false, p);
- assertFalse(inbs.isEmpty());
-
- bs = cdi.getBeans(new Path("/CDITest1/src/cdi/test/MyBeanManager.java"));
- assertFalse(bs.isEmpty());
- b = bs.iterator().next();
- ps = b.getInjectionPoints();
- p = ps.iterator().next();
- inbs = cdi.getBeans(false, p);
- assertFalse(inbs.isEmpty());
-
- //Find bean defined in some-weld.jar
- bs = cdi.getBeans("beanInWeldJar", false);
- assertEquals(1, bs.size());
- }
-
- public void tearDown() throws Exception {
- boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
- project1.delete(true, true, null);
- JobUtils.waitForIdle();
- ResourcesUtils.setBuildAutomatically(saveAutoBuild);
- JobUtils.waitForIdle();
- }
-}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java 2011-07-28
22:14:14 UTC (rev 33326)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java 2011-07-28
22:14:27 UTC (rev 33327)
@@ -15,9 +15,9 @@
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IBuiltInBean;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPointField;
-import org.jboss.tools.cdi.internal.core.impl.BuiltInBean;
/**
* @author Viacheslav Kabanovich
@@ -35,7 +35,7 @@
assertFalse(beans.isEmpty());
IBean b = beans.iterator().next();
- assertTrue(b instanceof BuiltInBean);
+ assertTrue(b instanceof IBuiltInBean);
IType t = b.getBeanClass();
assertEquals("javax.transaction.UserTransaction",
t.getFullyQualifiedName());
}
@@ -51,7 +51,7 @@
assertFalse(beans.isEmpty());
IBean b = beans.iterator().next();
- assertTrue(b instanceof BuiltInBean);
+ assertTrue(b instanceof IBuiltInBean);
IType t = b.getBeanClass();
assertEquals("javax.validation.ValidatorFactory",
t.getFullyQualifiedName());
}
@@ -67,7 +67,7 @@
assertFalse(beans.isEmpty());
IBean b = beans.iterator().next();
- assertTrue(b instanceof BuiltInBean);
+ assertTrue(b instanceof IBuiltInBean);
IType t = b.getBeanClass();
assertEquals("javax.validation.Validator", t.getFullyQualifiedName());
}
@@ -83,7 +83,7 @@
assertFalse(beans.isEmpty());
IBean b = beans.iterator().next();
- assertTrue(b instanceof BuiltInBean);
+ assertTrue(b instanceof IBuiltInBean);
IType t = b.getBeanClass();
assertEquals("java.security.Principal", t.getFullyQualifiedName());
}
@@ -99,7 +99,7 @@
assertFalse(beans.isEmpty());
IBean b = beans.iterator().next();
- assertTrue(b instanceof BuiltInBean);
+ assertTrue(b instanceof IBuiltInBean);
IType t = b.getBeanClass();
assertEquals(CDIConstants.BEAN_MANAGER_TYPE_NAME, t.getFullyQualifiedName());
}