JBoss Tools SVN: r5643 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: src/org/jboss/tools/jsf/vpe/facelets/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-11 13:58:30 -0500 (Fri, 11 Jan 2008)
New Revision: 5643
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1517
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml 2008-01-11 18:55:27 UTC (rev 5642)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml 2008-01-11 18:58:30 UTC (rev 5643)
@@ -1,14 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:decorate template="/pages/components/insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:decorate>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:decorate template="/pages/components/insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+</ui:decorate>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml 2008-01-11 18:55:27 UTC (rev 5642)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml 2008-01-11 18:58:30 UTC (rev 5643)
@@ -1,14 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:decorate template="./insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:decorate>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:decorate template="./insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+</ui:decorate>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 18:55:27 UTC (rev 5642)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 18:58:30 UTC (rev 5643)
@@ -212,30 +212,17 @@
*/
public void testDecorate() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/decorate_absolute.xhtml");
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml");
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with absolute path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with absolute path is not included", 1, elements
- .size());
-
// check related path
- element = performTestForFaceletComponent("components/decorate_related.xhtml");
- node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ element = performTestForFaceletComponent("components/composition_related.xhtml");
- elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with related path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with related path is not included", 1, elements
- .size());
-
if (getException() != null) {
throw getException();
}
16 years, 5 months
JBoss Tools SVN: r5642 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: src/org/jboss/tools/jsf/vpe/facelets/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-11 13:55:27 -0500 (Fri, 11 Jan 2008)
New Revision: 5642
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1515
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml 2008-01-11 18:27:31 UTC (rev 5641)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml 2008-01-11 18:55:27 UTC (rev 5642)
@@ -1,14 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:composition template="/pages/components/insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:composition>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:composition template="/pages/components/insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+</ui:composition>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml 2008-01-11 18:27:31 UTC (rev 5641)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml 2008-01-11 18:55:27 UTC (rev 5642)
@@ -1,14 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:composition template="./insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:composition>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:composition template="./insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+</ui:composition>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 18:27:31 UTC (rev 5641)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 18:55:27 UTC (rev 5642)
@@ -125,29 +125,16 @@
// check absolute path
nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml");
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with absolute path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with absolute path is not included", 1, elements
- .size());
-
// check related path
element = performTestForFaceletComponent("components/composition_related.xhtml");
- node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with related path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with related path is not included", 1, elements
- .size());
-
if (getException() != null) {
throw getException();
}
@@ -399,4 +386,35 @@
return element;
}
+ private void checkTemplatePage(nsIDOMElement element, String contextString,
+ String message) {
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(message, 1, elements.size());
+
+ nsIDOMElement table = (nsIDOMElement) elements.get(0).queryInterface(
+ nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement tbody = (nsIDOMElement) table.getFirstChild()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement tr = (nsIDOMElement) tbody.getFirstChild()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement td = (nsIDOMElement) tr.getFirstChild().queryInterface(
+ nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement div = (nsIDOMElement) td.getFirstChild().queryInterface(
+ nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement span = (nsIDOMElement) div.getFirstChild()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMText text = (nsIDOMText) span.getFirstChild().queryInterface(
+ nsIDOMText.NS_IDOMTEXT_IID);
+
+ assertEquals(message, contextString, text.getNodeValue());
+ }
+
}
16 years, 5 months
JBoss Tools SVN: r5641 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test: src/org/jboss/tools/struts/vpe/struts/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 13:27:31 -0500 (Fri, 11 Jan 2008)
New Revision: 5641
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsBeanComponentTest.java
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsLogicComponentTest.java
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp
Modified:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp 2008-01-11 17:53:05 UTC (rev 5640)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp 2008-01-11 18:27:31 UTC (rev 5641)
@@ -1,10 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <bean:cookie id="variableName" name="cookieName" value="default"/>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp 2008-01-11 17:53:05 UTC (rev 5640)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp 2008-01-11 18:27:31 UTC (rev 5641)
@@ -1,10 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <bean:header id="variableName" name="cookieName" value="default"/>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp 2008-01-11 17:53:05 UTC (rev 5640)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp 2008-01-11 18:27:31 UTC (rev 5641)
@@ -1,10 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <bean:parameter id="variableName" name="parameterName" value="default"/>
-</body>
-</html:html>
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-11 17:53:05 UTC (rev 5640)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-11 18:27:31 UTC (rev 5641)
@@ -31,6 +31,8 @@
TestSuite suite = new TestSuite("Tests for Vpe Struts components"); // $NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(StrutsHTMLComponentTest.class);
+ suite.addTestSuite(StrutsBeanComponentTest.class);
+ suite.addTestSuite(StrutsLogicComponentTest.class);
//cleanUpTests();
// $JUnit-END$
return new VpeTestSetup(suite,TestUtil.createImportBeanList(StrutsHTMLComponentTest.IMPORT_PROJECT_NAME, StrutsTestPlugin.getPluginResourcePath()));
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsBeanComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsBeanComponentTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsBeanComponentTest.java 2008-01-11 18:27:31 UTC (rev 5641)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.struts.vpe.struts.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing bean struts components
+ *
+ * @author dazarov
+ *
+ */
+public class StrutsBeanComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsBeanComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts Bean test cases
+ */
+
+ public void testCookie() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/cookie.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testDefine() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/define.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testHeader() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/header.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testInclude() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/include.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testMessage() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/message.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testParameter() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/parameter.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testResource() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/resource.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testSize() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/size.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testStruts() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/struts.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testWrite() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/bean/write.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+}
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java 2008-01-11 17:53:05 UTC (rev 5640)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java 2008-01-11 18:27:31 UTC (rev 5641)
@@ -15,9 +15,9 @@
import org.jboss.tools.vpe.ui.test.VpeTest;
/**
- * Class for testing all struts components
+ * Class for testing html struts components
*
- * @author sdzmitrovich
+ * @author dazarov
*
*/
public class StrutsHTMLComponentTest extends VpeTest {
@@ -68,19 +68,4 @@
public void testMessages() throws Throwable {
performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/messages.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
-
- public void testParameter() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/parameter.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testCookie() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/cookie.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testHeader() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/header.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
-
-
}
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsLogicComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsLogicComponentTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsLogicComponentTest.java 2008-01-11 18:27:31 UTC (rev 5641)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.struts.vpe.struts.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing logic struts components
+ *
+ * @author dazarov
+ *
+ */
+public class StrutsLogicComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsLogicComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts Logic test cases
+ */
+
+ public void testEmpty() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/empty.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testNotEmpty() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/notEmpty.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testEqual() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/equal.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testNotEqual() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/notEqual.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testGreaterEqual() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/greaterEqual.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testGreaterThan() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/greaterThan.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testIterate() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/iterate.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testLessEqual() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/lessEqual.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testLessThan() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/lessThan.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testMatch() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/match.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testNotMatch() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/logic/notMatch.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+}
16 years, 5 months
JBoss Tools SVN: r5640 - trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 12:53:05 -0500 (Fri, 11 Jan 2008)
New Revision: 5640
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/base.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/errors.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/frame.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/image.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/img.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/link.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/messages.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/rewrite.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.gif
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/base.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/base.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/base.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,10 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html>
-<head>
-</head>
-<body>
-
-<html:base />
-
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/errors.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/errors.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/errors.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:errors property="org.apache.struts.action.GLOBAL_ERROR"/>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/frame.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/frame.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/frame.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,12 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
-
- <html:frame href="./test.jsp">
-
- </html:frame>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
-
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/image.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/image.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/image.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:image src="test.gif" />
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/img.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/img.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/img.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:img page="test.gif" style="width:100;height:100"/>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/link.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/link.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/link.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:link href="test.jsp">test.jsp</html:link>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/messages.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/messages.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/messages.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,13 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:messages id="aa">
-
-
-
- </html:messages>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/rewrite.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/rewrite.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/rewrite.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <html:rewrite href="test.jsp" name="test"/>
-</body>
-</html:html>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.gif
===================================================================
(Binary files differ)
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.jsp 2008-01-11 17:52:44 UTC (rev 5639)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/test.jsp 2008-01-11 17:53:05 UTC (rev 5640)
@@ -1,9 +0,0 @@
-<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
-<html:html>
-<head>
- <title></title>
-</head>
-<body>
- <p>Some text...</p>
-</body>
-</html:html>
16 years, 5 months
JBoss Tools SVN: r5639 - trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 12:52:44 -0500 (Fri, 11 Jan 2008)
New Revision: 5639
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsComponentTest.java
Modified:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-11 17:51:27 UTC (rev 5638)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-11 17:52:44 UTC (rev 5639)
@@ -30,10 +30,10 @@
TestSuite suite = new TestSuite("Tests for Vpe Struts components"); // $NON-NLS-1$
// $JUnit-BEGIN$
- suite.addTestSuite(StrutsComponentTest.class);
+ suite.addTestSuite(StrutsHTMLComponentTest.class);
//cleanUpTests();
// $JUnit-END$
- return new VpeTestSetup(suite,TestUtil.createImportBeanList(StrutsComponentTest.IMPORT_PROJECT_NAME, StrutsTestPlugin.getPluginResourcePath()));
+ return new VpeTestSetup(suite,TestUtil.createImportBeanList(StrutsHTMLComponentTest.IMPORT_PROJECT_NAME, StrutsTestPlugin.getPluginResourcePath()));
}
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsComponentTest.java 2008-01-11 17:51:27 UTC (rev 5638)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsComponentTest.java 2008-01-11 17:52:44 UTC (rev 5639)
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.struts.vpe.struts.test;
-
-import org.eclipse.core.resources.IFile;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-
-/**
- * Class for testing all struts components
- *
- * @author sdzmitrovich
- *
- */
-public class StrutsComponentTest extends VpeTest {
-
- // import project name
- static final String IMPORT_PROJECT_NAME = "StrutsTest";
-
- public StrutsComponentTest(String name) {
- super(name);
- }
-
- /*
- * Struts HTML test cases
- */
-
- public void testBase() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/base.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testErrors() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/errors.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testFrame() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/frame.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testHtml() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testImage() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/image.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testImg() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/img.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testLink() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/link.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testRewrite() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/rewrite.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testMessages() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/messages.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
-
-
-
-
-
-}
Copied: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java (from rev 5611, trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsComponentTest.java)
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsHTMLComponentTest.java 2008-01-11 17:52:44 UTC (rev 5639)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.struts.vpe.struts.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing all struts components
+ *
+ * @author sdzmitrovich
+ *
+ */
+public class StrutsHTMLComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsHTMLComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts HTML test cases
+ */
+
+ public void testBase() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/base.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testErrors() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/errors.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testFrame() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/frame.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testHtml() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/html.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testImage() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/image.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testImg() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/img.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testLink() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/link.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testRewrite() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/rewrite.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testMessages() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/messages.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testParameter() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/parameter.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testCookie() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/cookie.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testHeader() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/html/header.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+
+
+}
16 years, 5 months
JBoss Tools SVN: r5638 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components: logic and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 12:51:27 -0500 (Fri, 11 Jan 2008)
New Revision: 5638
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/empty.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/equal.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterEqual.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterThan.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/iterate.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessEqual.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessThan.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/match.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEmpty.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEqual.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notMatch.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/empty.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/empty.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/empty.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("goodThingsAbouteTheYankees", "");
+ %>
+ <logic:empty name="goodThingsAbouteTheYankees">
+ You must be a Red Sox fan!
+ </logic:empty>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/equal.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/equal.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/equal.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:equal name="numberIntValue" value="90210" scope="request">
+ equal
+ </logic:equal>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterEqual.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterEqual.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterEqual.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:greaterEqual name="numberIntValue" value="90211" scope="request">
+ greaterEqual
+ </logic:greaterEqual>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterThan.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterThan.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/greaterThan.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:greaterThan name="numberIntValue" value="90211" scope="request">
+ greaterThan
+ </logic:greaterThan>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/iterate.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/iterate.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/iterate.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,27 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<%@ page import="java.util.HashMap" %>
+<html:html>
+<head>
+ <title>Logic iterate sample code</title>
+</head>
+<body>
+ <%
+ HashMap<String, String[]> h = new HashMap<String, String[]>();
+ String jameses[] = {"Joyce", "Thurber", "Kirk", "Cameron", "Monroe"};
+ String kevins[] = {"Spacey", "Bacon"};
+ String bruces[] = {"Willis", "The Shark", "Cockburn"};
+ h.put("James", jameses);
+ h.put("Kevin", kevins);
+ h.put("Bruce", bruces);
+ request.setAttributes("givenNames", h);
+ %>
+ <logic:iterate id="gname" indexId="ind" name="givenNames">
+ <bean:write name="ind" />. <bean:write name="gname" property="key" /><BR>
+ <logic:iterate id="lname" name="gname" property="value" length="4" offset="1">
+ <bean:write name="lname" /><br>
+ </logic:iterate>
+ </logic:iterate>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessEqual.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessEqual.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessEqual.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:lessEqual name="numberIntValue" value="90200" scope="request">
+ lessEqual
+ </logic:lessEqual>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessThan.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessThan.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/lessThan.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:lessThan name="numberIntValue" value="90200" scope="request">
+ lessThan
+ </logic:lessThan>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/match.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/match.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/match.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,19 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("authorName1", "James M. Turner");
+ request.setAttribute("authorName2", "Kevin Bedell");
+ %>
+ <logic:match name="authorName1" value="ames" scope="request">
+ match
+ </logic:match>
+ <logic:match name="authorName2" value="ames" scope="request">
+ match
+ </logic:match>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEmpty.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEmpty.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEmpty.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("goodThingsAbouteTheYankees", "goodThings");
+ %>
+ <logic:notEmpty name="goodThingsAbouteTheYankees">
+ New Yorker, eh?
+ </logic:notEmpty>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEqual.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEqual.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notEqual.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("numberIntValue",new Integer(90210));
+ %>
+ <logic:notEqual name="numberIntValue" value="90211" scope="request">
+ notEqual
+ </logic:notEqual>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notMatch.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notMatch.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/logic/notMatch.jsp 2008-01-11 17:51:27 UTC (rev 5638)
@@ -0,0 +1,19 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ request.setAttribute("authorName1", "James M. Turner");
+ request.setAttribute("authorName2", "Kevin Bedell");
+ %>
+ <logic:notMatch name="authorName1" value="qwerty" scope="request">
+ notMatch
+ </logic:notMatch>
+ <logic:notMatch name="authorName2" value="qwerty" scope="request">
+ notMatch
+ </logic:notMatch>
+</body>
+</html:html>
16 years, 5 months
JBoss Tools SVN: r5637 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components: html and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 12:50:49 -0500 (Fri, 11 Jan 2008)
New Revision: 5637
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/base.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/errors.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/frame.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/html.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/image.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/img.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/link.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/messages.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/rewrite.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.gif
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/base.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/base.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/base.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html>
+<head>
+</head>
+<body>
+
+<html:base />
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/cookie.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:cookie id="variableName" name="cookieName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/errors.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/errors.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/errors.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:errors property="org.apache.struts.action.GLOBAL_ERROR"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/frame.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/frame.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/frame.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+
+ <html:frame href="./test.jsp">
+
+ </html:frame>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/header.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:header id="variableName" name="cookieName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/html.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/html.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/html.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/image.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/image.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/image.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:image src="test.gif" />
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/img.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/img.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/img.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:img page="test.gif" style="width:100;height:100"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/link.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/link.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/link.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:link href="test.jsp">test.jsp</html:link>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/messages.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/messages.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/messages.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,13 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:messages id="aa">
+
+
+
+ </html:messages>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/parameter.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:parameter id="variableName" name="parameterName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/rewrite.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/rewrite.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/rewrite.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:rewrite href="test.jsp" name="test"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.gif
===================================================================
(Binary files differ)
Property changes on: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/html/test.jsp 2008-01-11 17:50:49 UTC (rev 5637)
@@ -0,0 +1,9 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <p>Some text...</p>
+</body>
+</html:html>
16 years, 5 months
JBoss Tools SVN: r5636 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components: bean and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-11 12:50:23 -0500 (Fri, 11 Jan 2008)
New Revision: 5636
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/cookie.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/define.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/header.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/include.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/message.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/parameter.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/resource.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/size.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/struts.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/write.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/cookie.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/cookie.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/cookie.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:cookie id="variableName" name="cookieName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/define.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/define.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/define.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <% request.setAttribute("session",session); %>
+ <bean:define id="context" name="session" />
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/header.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/header.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/header.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:header id="variableName" name="cookieName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/include.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/include.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/include.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:include id="test" page="message.jsp" />
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/message.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/message.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/message.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:message bundle="demo.pythonquotes" key="ni"/>
+ <bean:message bundle="demo.pythonquotes" name="rq" property="randomQuoteName"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/parameter.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/parameter.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/parameter.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:parameter id="variableName" name="parameterName" value="default"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/resource.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/resource.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/resource.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:resource id="resource" name="message.jsp" />
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/size.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/size.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/size.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,19 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<%@ page import="java.util.HashMap" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <%
+ HashMap<String,String> lines = new HashMap<String,String>();
+ lines.put("1", "Line 1");
+ lines.put("2", "Line 2");
+ lines.put("3", "Line 3");
+ request.setAttribute("lines", lines);
+ %>
+ <bean:size id="length" name="lines" />
+ Line Count: <bean:write name="lenght"/>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/struts.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/struts.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/struts.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:struts id="map" mapping="/HtmlFile" />
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/write.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/write.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/bean/write.jsp 2008-01-11 17:50:23 UTC (rev 5636)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <bean:write name="map" property="type" />
+</body>
+</html:html>
16 years, 5 months
JBoss Tools SVN: r5635 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: src/org/jboss/tools/jsf/vpe/facelets/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-11 12:06:32 -0500 (Fri, 11 Jan 2008)
New Revision: 5635
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/repeat.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1524
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/repeat.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/repeat.xhtml 2008-01-11 17:01:37 UTC (rev 5634)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/repeat.xhtml 2008-01-11 17:06:32 UTC (rev 5635)
@@ -8,13 +8,11 @@
<title>Repeat Test</title>
</head>
<body bgcolor="#ffffff">
- <dl>
- <ui:repeat value="#{company.departments}" var="dept">
- <dt>#{dept.name}</dt>
- <ui:repeat value="#{dept.employees}" var="emp">
- <dd>#{emp.lastName}, #{emp.firstName}</dd>
- </ui:repeat>
- </ui:repeat>
+<dl>
+ <ui:repeat value="#{company.departments}" var="dept">
+ <dt>#{dept.name}</dt>
+ <dd>#{dept.lastName}, #{dept.firstName}</dd>
+ </ui:repeat>
</dl>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 17:01:37 UTC (rev 5634)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 17:06:32 UTC (rev 5635)
@@ -71,7 +71,8 @@
nsIDOMText text = (nsIDOMText) div.getFirstChild().queryInterface(
nsIDOMText.NS_IDOMTEXT_IID);
- assertEquals(text.getNodeValue(), "Ctrl+Shift+");
+ assertEquals("Debug's content is not shown", text.getNodeValue(),
+ "Ctrl+Shift+");
if (getException() != null) {
throw getException();
@@ -105,8 +106,10 @@
nsIDOMText text1 = (nsIDOMText) elementSpan1.getFirstChild()
.queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
- assertEquals(text0.getNodeValue(), "Greeting Page");
- assertEquals(text1.getNodeValue(), "#{person.name}!");
+ assertEquals("Defined content is not shown", text0.getNodeValue(),
+ "Greeting Page");
+ assertEquals("Defined content is not shown", text1.getNodeValue(),
+ "#{person.name}!");
if (getException() != null) {
throw getException();
@@ -130,7 +133,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with absolute path is not included", 1, elements
+ .size());
// check related path
element = performTestForFaceletComponent("components/composition_related.xhtml");
@@ -141,7 +145,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with related path is not included", 1, elements
+ .size());
if (getException() != null) {
throw getException();
@@ -175,8 +180,8 @@
String title = div.getAttribute("title");
- assertEquals(title.replaceAll("\\s+", ""),
- "ui:componentbinding:#{backingBean.menu}");
+ assertEquals("Component's content is not shown", title.replaceAll(
+ "\\s+", ""), "ui:componentbinding:#{backingBean.menu}");
if (getException() != null) {
throw getException();
}
@@ -205,8 +210,8 @@
nsIDOMText text = (nsIDOMText) elementSpan.getFirstChild()
.queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
- assertEquals(false, text.getNodeValue().equals(
- "\nThis will be removed.\n"));
+ assertEquals("Content inside ui:remove tag shouldn't be shown", false,
+ text.getNodeValue().equals("\nThis will be removed.\n"));
if (getException() != null) {
throw getException();
@@ -229,7 +234,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with absolute path is not included", 1, elements
+ .size());
// check related path
element = performTestForFaceletComponent("components/decorate_related.xhtml");
@@ -240,7 +246,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with related path is not included", 1, elements
+ .size());
if (getException() != null) {
throw getException();
@@ -253,9 +260,29 @@
* @throws Throwable
*/
public void testRepeat() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/repeat.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- assertTrue("Component's content is not shown", false);
+ nsIDOMElement element = performTestForFaceletComponent("components/repeat.xhtml");
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "dl" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_DL);
+
+ assertEquals(1, elements.size());
+
+ nsIDOMElement elementDL = (nsIDOMElement) elements.get(0)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMElement elementDT = (nsIDOMElement) elementDL.getFirstChild()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
+ .getNodeName().toUpperCase());
+
+ if (getException() != null) {
+ throw getException();
+ }
}
/**
@@ -274,7 +301,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with absolute path is not included", 1, elements
+ .size());
// check related path
element = performTestForFaceletComponent("components/include_related.xhtml");
@@ -285,7 +313,8 @@
// find "table" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(1, elements.size());
+ assertEquals("Template with related path is not included", 1, elements
+ .size());
if (getException() != null) {
throw getException();
@@ -318,8 +347,8 @@
String title = div.getAttribute("title");
- assertEquals(title.replaceAll("\\s+", ""),
- "ui:fragmentbinding:#{uiCache['searchResult']}");
+ assertEquals("Fragment's content is not shown", title.replaceAll(
+ "\\s+", ""), "ui:fragmentbinding:#{uiCache['searchResult']}");
if (getException() != null) {
throw getException();
}
16 years, 5 months
JBoss Tools SVN: r5634 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-01-11 12:01:37 -0500 (Fri, 11 Jan 2008)
New Revision: 5634
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
Log:
buttons updated
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-11 16:47:52 UTC (rev 5633)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-11 17:01:37 UTC (rev 5634)
@@ -143,10 +143,6 @@
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
buttonsDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-layout");
- nsIDOMElement btnTopDiv = createButtonDiv(visualDocument,
- (null == upControlLabel ? TOP_CONTROL_LABEL_DEFAULT
- : upControlLabel), TOP_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue());
nsIDOMElement btnUpDiv = createButtonDiv(visualDocument,
(null == upControlLabel ? UP_CONTROL_LABEL_DEFAULT
: upControlLabel), UP_CONTROL_IMG, new Boolean(
@@ -155,15 +151,23 @@
(null == upControlLabel ? DOWN_CONTROL_LABEL_DEFAULT
: upControlLabel), DOWN_CONTROL_IMG, new Boolean(
showButtonLabels).booleanValue());
- nsIDOMElement btnBottomDiv = createButtonDiv(visualDocument,
- (null == upControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
- : upControlLabel), BOTTOM_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue());
- buttonsDiv.appendChild(btnTopDiv);
+ if (fastOrderControlsVisible) {
+ nsIDOMElement btnTopDiv = createButtonDiv(visualDocument,
+ (null == upControlLabel ? TOP_CONTROL_LABEL_DEFAULT
+ : upControlLabel), TOP_CONTROL_IMG, new Boolean(
+ showButtonLabels).booleanValue());
+ nsIDOMElement btnBottomDiv = createButtonDiv(visualDocument,
+ (null == upControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
+ : upControlLabel), BOTTOM_CONTROL_IMG, new Boolean(
+ showButtonLabels).booleanValue());
+
+ buttonsDiv.appendChild(btnTopDiv);
+ buttonsDiv.appendChild(btnBottomDiv);
+ }
+
buttonsDiv.appendChild(btnUpDiv);
buttonsDiv.appendChild(btnDownDiv);
- buttonsDiv.appendChild(btnBottomDiv);
row2_TD2.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center");
row2_TD2.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, ("center"
@@ -354,54 +358,13 @@
* visual document
* @param btnName
* the button label
- * @param imgPath
+ * @param imgName
* path to the image
* @param showButtonLabels
* show button label flag
*
* @return the button
*/
- private nsIDOMElement createButton(nsIDOMDocument visualDocument,
- String btnName, String imgPath, boolean showButtonLabels) {
- nsIDOMElement btn = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_BUTTON);
- btn.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR,
- HtmlComponentUtil.HTML_TYPE_ATTR_BUTTON_VALUE);
-
- nsIDOMElement btnImg = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_IMG);
-
- String path = RichFacesTemplatesActivator.getPluginResourcePath()
- + imgPath;
- btnImg.setAttribute("src", "file://" + path);
- if (showButtonLabels) {
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
-
- nsIDOMElement row1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement row1_TD1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- nsIDOMElement row1_TD2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
-
- row1_TD1.appendChild(btnImg);
- row1_TD2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-control-buttons");
- row1_TD2.appendChild(visualDocument.createTextNode(btnName));
-
- row1.appendChild(row1_TD1);
- row1.appendChild(row1_TD2);
- table.appendChild(row1);
- btn.appendChild(table);
-
- } else {
- btn.appendChild(btnImg);
- }
-
- return btn;
- }
-
private nsIDOMElement createButtonDiv(nsIDOMDocument visualDocument,
String btnName, String imgName, boolean showButtonLabels) {
@@ -432,9 +395,13 @@
div1.appendChild(div2);
div2.appendChild(a);
a.appendChild(div3);
+
div3.appendChild(img);
- div3.appendChild(visualDocument.createTextNode(btnName));
+ if (showButtonLabels) {
+ div3.appendChild(visualDocument.createTextNode(btnName));
+ }
+
return div1;
}
16 years, 5 months