Author: dazarov
Date: 2008-01-15 10:01:30 -0500 (Tue, 15 Jan 2008)
New Revision: 5704
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/add.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/definition.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/get.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/getAsString.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/importAttribute.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/insert.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/putList.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/userAttribute.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTilesComponentTest.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
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/add.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/add.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/add.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:add beanName="title" direct="true"/>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/definition.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/definition.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/definition.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:definition id="abc" />
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/get.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/get.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/get.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:get name="abc"/>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/getAsString.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/getAsString.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/getAsString.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:getAsString name="abc"/>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/importAttribute.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/importAttribute.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/importAttribute.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:importAttribute name="title"/>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/insert.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/insert.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/insert.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:insert attribute="header">
+ <tiles:put name="title" beanName="title"
direct="true"/>
+ </tiles:insert>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/putList.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/putList.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/putList.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:putList name="abc">
+ </tiles:putList>
+</body>
+</html:html>
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/userAttribute.jsp
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/userAttribute.jsp
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/tiles/userAttribute.jsp 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <tiles:useAttribute name="abc"/>
+</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-15
14:53:26 UTC (rev 5703)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-15
15:01:30 UTC (rev 5704)
@@ -35,6 +35,7 @@
suite.addTestSuite(StrutsLogicComponentTest.class);
suite.addTestSuite(StrutsFormComponentTest.class);
suite.addTestSuite(StrutsNestedComponentTest.class);
+ suite.addTestSuite(StrutsTilesComponentTest.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/StrutsTilesComponentTest.java
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTilesComponentTest.java
(rev 0)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTilesComponentTest.java 2008-01-15
15:01:30 UTC (rev 5704)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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 tiles struts components
+ *
+ * @author dazarov
+ *
+ */
+public class StrutsTilesComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsTilesComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts Tiles test cases
+ */
+
+ public void testAdd() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/add.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testDefinition() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/definition.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testGet() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/get.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testGetAsString() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/getAsString.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testImportAttribute() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/importAttribute.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testInitComponentDefinitions() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/initComponentDefinitions.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testInsert() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/insert.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testPutList() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/putList.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testUserAttribute() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/tiles/userAttribute.jsp",
IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+}