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$
+ }
+}