[jbosstools-commits] JBoss Tools SVN: r30828 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test: src/org/jboss/tools/cdi/seam/faces/core/test and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Apr 25 16:11:07 EDT 2011
Author: akazakov
Date: 2011-04-25 16:11:07 -0400 (Mon, 25 Apr 2011)
New Revision: 30828
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8572
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-04-25 19:47:16 UTC (rev 30827)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-04-25 20:11:07 UTC (rev 30828)
@@ -6,4 +6,5 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.jboss.tools.cdi.seam.faces.core,
org.eclipse.jdt.core,
- org.junit
+ org.junit,
+ org.jboss.tools.jst.web.kb
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java 2011-04-25 19:47:16 UTC (rev 30827)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java 2011-04-25 20:11:07 UTC (rev 30828)
@@ -10,11 +10,47 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.faces.core.test;
+import java.util.HashSet;
+import java.util.Set;
+
import junit.framework.TestCase;
+import org.jboss.tools.jst.web.kb.internal.proposal.CustomProposalType;
+import org.jboss.tools.jst.web.kb.internal.proposal.EnumerationProposalType;
+import org.jboss.tools.jst.web.kb.internal.taglib.CustomTagLibAttribute;
+import org.jboss.tools.jst.web.kb.taglib.CustomTagLibManager;
+import org.jboss.tools.jst.web.kb.taglib.IAttribute;
+import org.jboss.tools.jst.web.kb.taglib.IComponent;
+import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibrary;
+
/**
* @author Alexey Kazakov
*/
public class SeamFacesTagLibTest extends TestCase {
+ public void testCustomTagLibs() {
+ ICustomTagLibrary[] libs = CustomTagLibManager.getInstance().getLibraries();
+ boolean found = false;
+ for (ICustomTagLibrary lib : libs) {
+ if("http://jboss.org/seam/faces".equals(lib.getURI())) {
+ found = true;
+ IComponent component = lib.getComponent("viewAction");
+ assertNotNull(component);
+ IAttribute attribute = component.getAttribute("phase");
+ assertNotNull(attribute);
+ assertTrue(attribute instanceof CustomTagLibAttribute);
+ CustomTagLibAttribute customAttribute = (CustomTagLibAttribute)attribute;
+ CustomProposalType[] proposals = customAttribute.getProposals();
+ Set<EnumerationProposalType> enums = new HashSet<EnumerationProposalType>();
+ for (CustomProposalType proposal : proposals) {
+ if(proposal instanceof EnumerationProposalType) {
+ enums.add((EnumerationProposalType)proposal);
+ }
+ }
+ assertEquals(4, enums.size());
+ break;
+ }
+ }
+ assertTrue("Can't find http://jboss.org/seam/faces tag lib.", found);
+ }
}
\ No newline at end of file
More information about the jbosstools-commits
mailing list