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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Apr 8 20:10:14 EDT 2011


Author: scabanovich
Date: 2011-04-08 20:10:13 -0400 (Fri, 08 Apr 2011)
New Revision: 30454

Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java
Log:
JBIDE-8198
https://issues.jboss.org/browse/JBIDE-8198

Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java	2011-04-09 00:06:15 UTC (rev 30453)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java	2011-04-09 00:10:13 UTC (rev 30454)
@@ -42,7 +42,7 @@
 		JobUtils.waitForIdle();
 	}
 
-	public void testVeto() throws CoreException, IOException {
+	public void testExact() throws CoreException, IOException {
 		ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
 
 		Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
@@ -84,43 +84,6 @@
 		assertEquals(3, count);
 	}
 
-	public void testRequires() throws CoreException, IOException {
-		ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
-		//1. class annotated @Requires that references single non-available class
-		TypeDefinition d = cdi.getNature().getDefinitions().getTypeDefinition("org.jboss.requires.Bear");
-		assertNotNull(d);            //Though there exists Java type Bear
-		IAnnotationDeclaration a = d.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
-		assertNotNull(a);
-		Object name = a.getMemberValue(null);
-		assertEquals("bear", name); //...and it is annotated with @Named("bear")
-		Set<IBean> bs = cdi.getBeans("bear", false);
-		assertTrue(bs.isEmpty());    //...CDI model does not have a bean named "bear"
-		bs = cdi.getBeans(d.getResource().getFullPath());
-		assertTrue(bs.isEmpty());    //...and does not loaded any beans form its resource
-
-		//2. class annotated @Requires that references array of classes some of which are not available
-		d = cdi.getNature().getDefinitions().getTypeDefinition("org.jboss.requires.Bee");
-		assertNotNull(d);            //Though there exists Java type Bee
-		a = d.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
-		assertNotNull(a);
-		name = a.getMemberValue(null);
-		assertEquals("bee", name);  //...and it is annotated with @Named("bee")
-		bs = cdi.getBeans("bee", false);
-		assertTrue(bs.isEmpty());    //...CDI model does not have a bean named "bee"
-		bs = cdi.getBeans(d.getResource().getFullPath());
-		assertTrue(bs.isEmpty());    //...and does not loaded any beans form its resource
-
-		//3. class annotated @Requires that references single available class
-		bs = cdi.getBeans("fly", false);
-		assertEquals(1, bs.size());    //...CDI model has a bean named "fly"
-
-		//4. class annotated @Requires that references array of available classes
-		bs = cdi.getBeans("dragonfly", false);
-		assertEquals(1, bs.size());    //...CDI model has a bean named "dragonfly"
-
-	}
-
 	public void tearDown() throws Exception {
 		boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
 		JobUtils.waitForIdle();



More information about the jbosstools-commits mailing list