Author: yradtsevich
Date: 2012-01-26 13:13:02 -0500 (Thu, 26 Jan 2012)
New Revision: 38207
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/contextPathFolder/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/contextPathFolder/RedHat.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/requestContextPath.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/CustomRequestContextPathTest_JBIDE9025.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9025 : Substituted EL variable is not properly
evaulated
- created JUnit
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/contextPathFolder/RedHat.png
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/contextPathFolder/RedHat.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/requestContextPath.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/requestContextPath.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/9025/requestContextPath.jsp 2012-01-26
18:13:02 UTC (rev 38207)
@@ -0,0 +1,5 @@
+<html>
+<body>
+ <img id="testId" src="#{request.contextPath}/RedHat.png">
+</body>
+</html>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2012-01-26
17:47:17 UTC (rev 38206)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2012-01-26
18:13:02 UTC (rev 38207)
@@ -5,6 +5,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ChangeMessageBundleTest_JBIDE5818;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ContextMenuDoubleInsertionTest_JBIDE3888;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.CustomRequestContextPathTest_JBIDE9025;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.EditFontFamilyTest_JBIDE5872;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ExceptionInVPEComments_JBIDE5143;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.FacetProcessingTest;
@@ -101,6 +102,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(JsfAllImportantTests.class.getName());
//$JUnit-BEGIN$
+ suite.addTestSuite(CustomRequestContextPathTest_JBIDE9025.class);
suite.addTestSuite(SourceDomUtilTest.class);
suite.addTestSuite(XulRunnerVpeUtilsTest.class);
suite.addTestSuite(UnclosedELExpressionTest.class);
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/CustomRequestContextPathTest_JBIDE9025.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/CustomRequestContextPathTest_JBIDE9025.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/CustomRequestContextPathTest_JBIDE9025.java 2012-01-26
18:13:02 UTC (rev 38207)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.vpe.base.test.ComponentContentTest;
+import org.jboss.tools.vpe.base.test.TestUtil;
+
+/**
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public class CustomRequestContextPathTest_JBIDE9025 extends ComponentContentTest {
+
+ private static final String TEST_FILE_NAME =
"JBIDE/9025/requestContextPath.jsp";
+
+ /**
+ * Test file
+ */
+ private IFile file;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ setException(null);
+ this.file = (IFile) TestUtil.getComponentPath(TEST_FILE_NAME, //$NON-NLS-1$
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ ResourceReference[] entries = new ResourceReference[1];
+ entries[0] = new ResourceReference("request.contextPath",
ResourceReference.FILE_SCOPE);
+ entries[0].setProperties("contextPathFolder");
+ ELReferenceList.getInstance().setAllResources(this.file, entries);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.ui.test.VpeTest#tearDown()
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ ELReferenceList.getInstance().setAllResources(this.file, new ResourceReference[0]);
+ if(getException()!=null) {
+ throw new Exception(getException());
+ }
+ super.tearDown();
+ }
+
+ public CustomRequestContextPathTest_JBIDE9025(String name) {
+ super(name);
+ }
+
+ public void testJBIDE9025CustomRequestContextPath() throws Throwable {
+// IEditorInput input = new FileEditorInput(this.file);
+// JSPMultiPageEditor part = openEditor(input);
+// checkSourceSelection(part);
+ performContentTest(TEST_FILE_NAME); //$NON-NLS-1$
+ }
+
+ @Override
+ protected String getTestProjectName() {
+ return JsfAllTests.IMPORT_PROJECT_NAME;
+ }
+ }