Author: akazakov
Date: 2010-09-21 12:00:15 -0400 (Tue, 21 Sep 2010)
New Revision: 25064
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java
Log:
JBIDE-7113
https://jira.jboss.org/browse/JBIDE-7113
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java 2010-09-21
15:39:01 UTC (rev 25063)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java 2010-09-21
16:00:15 UTC (rev 25064)
@@ -12,15 +12,8 @@
import junit.framework.TestCase;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.jboss.tools.common.el.core.resolver.ELContext;
-import org.jboss.tools.common.text.TextProposal;
-import org.jboss.tools.jst.web.kb.KbQuery;
-import org.jboss.tools.jst.web.kb.KbQuery.Type;
-import org.jboss.tools.jst.web.kb.PageContextFactory;
-import org.jboss.tools.jst.web.kb.PageProcessor;
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.ICustomTagLibrary;
@@ -54,106 +47,9 @@
}
}
- /**
- *
https://jira.jboss.org/jira/browse/JBIDE-6284
- */
- public void testFFacet() {
- IFile file = testProject.getFile("WebContent/pages/inputUserName.xhtml");
- ELContext context = PageContextFactory.createPageContext(file);
- KbQuery query = new KbQuery();
- query.setMask(true);
- query.setOffset(356);
- query.setType(Type.TAG_NAME);
- query.setPrefix("f");
-
query.setUri("http://java.sun.com/jsf/core");
- query.setValue("f:facet");
-
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context);
- for (TextProposal proposal : proposals) {
- if("<f:facet
name=\"\">".equals(proposal.getReplacementString())) {
- return;
- }
- }
- fail("Can't find <f:facet name=\"\"> proposal.");
- }
-
- /**
- *
https://jira.jboss.org/jira/browse/JBIDE-5231
- */
- public void testSeamPdf() {
- IFile file =
testProject.getFile("WebContent/pages/testSeamPdfAndMail.xhtml");
- ELContext context = PageContextFactory.createPageContext(file);
- KbQuery query = new KbQuery();
- query.setMask(true);
- query.setOffset(356);
- query.setType(Type.ATTRIBUTE_NAME);
- query.setParentTags(new String[]{"p:document"});
- query.setPrefix("p");
-
query.setUri("http://jboss.com/products/seam/pdf");
- query.setValue("ori");
-
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context);
- for (TextProposal proposal : proposals) {
- if("orientation".equals(proposal.getReplacementString())) {
- return;
- }
- }
- fail("Can't find <p:document orientation=\"\">
proposal.");
- }
-
- /**
- *
https://jira.jboss.org/jira/browse/JBIDE-5198
- */
- public void testSeamMail() {
- IFile file =
testProject.getFile("WebContent/pages/testSeamPdfAndMail.xhtml");
- ELContext context = PageContextFactory.createPageContext(file);
- KbQuery query = new KbQuery();
- query.setMask(true);
- query.setOffset(356);
- query.setType(Type.ATTRIBUTE_NAME);
- query.setParentTags(new String[]{"m:message"});
- query.setPrefix("m");
-
query.setUri("http://jboss.com/products/seam/mail");
- query.setValue("pre");
-
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context);
- for (TextProposal proposal : proposals) {
- if("precedence".equals(proposal.getReplacementString())) {
- return;
- }
- }
- fail("Can't find <m:message precedence=\"\">
proposal.");
- }
-
public void testCustomExtensions() {
CustomTagLibAttribute[] attributes =
CustomTagLibManager.getInstance().getComponentExtensions();
assertNotNull("Can't load component extensions.", attributes);
assertFalse("Can't load component extensions.", attributes.length==0);
}
-
- /**
- *
https://jira.jboss.org/jira/browse/JBIDE-3875
- */
- public void testFacetNames() {
- IFile file = testProject.getFile("WebContent/pages/facetname.xhtml");
- ELContext context = PageContextFactory.createPageContext(file);
- KbQuery query = new KbQuery();
- query.setMask(true);
- query.setOffset(302);
- query.setType(Type.ATTRIBUTE_VALUE);
- query.setPrefix("f");
-
query.setUri("http://java.sun.com/jsf/core");
- query.setValue("h");
- query.setParentTags(new String[]{"rich:page", "f:facet"});
- query.setParent("name");
- query.setStringQuery("h");
-
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context);
- for (TextProposal proposal : proposals) {
- if("header".equals(proposal.getReplacementString())) {
- return;
- }
- }
- fail("Can't find \"header\" proposal.");
- }
}
\ No newline at end of file