Author: estherbin
Date: 2008-07-29 12:49:34 -0400 (Tue, 29 Jul 2008)
New Revision: 9403
Added:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2582Test.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/ElPreferencesTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
Log:
Implements
https://jira.jboss.org/jira/browse/JBIDE-2582
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-29
16:48:43 UTC (rev 9402)
+++
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-29
16:49:34 UTC (rev 9403)
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.vpe.test;
@@ -92,7 +92,7 @@
elValuesMap.put(KEY_3, "/facesContext/");
elValuesMap.put(KEY_4, VALUE_4);
elValuesMap.put(KEY_5, VALUE_5);
- file = (IFile) TestUtil.getComponentPath(DIR_TEST_PAGE_NAME,
IMPORT_PROJECT_NAME);
+ file = (IFile) TestUtil.getComponentPath(getOpenPageName(),
getOpenProjectName());
ResourceReference[] entries = new ResourceReference[elValuesMap.size()];
int i = 0;
for (Entry<String, String> string : elValuesMap.entrySet()) {
@@ -101,10 +101,19 @@
entries[i].setProperties(string.getValue());
i++;
- setValues(entries);
+
}
+ setValues(entries);
}
+
+ protected String getOpenPageName(){
+ return DIR_TEST_PAGE_NAME;
+ }
+
+ protected String getOpenProjectName(){
+ return IMPORT_PROJECT_NAME;
+ }
/**
* Sets the values.
*
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/ElPreferencesTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/ElPreferencesTestCase.java 2008-07-29
16:48:43 UTC (rev 9402)
+++
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/ElPreferencesTestCase.java 2008-07-29
16:49:34 UTC (rev 9403)
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.vpe.test;
Added:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2582Test.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2582Test.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2582Test.java 2008-07-29
16:49:34 UTC (rev 9403)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.vpe.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <a
+ *
href="https://jira.jboss.org/jira/browse/JBIDE-2582"> JBIDE-2582
</a> issue
+ *
+ * @author Evgenij Stherbin
+ */
+public class JBIDE2582Test extends CommonJBIDE2010Test {
+
+ /** The Constant DIR_TEST_PAGE_NAME_3. */
+ protected static final String PAGE_1 = "JBIDE/2582/page1.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public JBIDE2582Test(String name) {
+ super(name);
+
+ }
+
+ /**
+ * Test rs substitution.
+ *
+ * @throws Throwable the throwable
+ */
+ public void testRsSubstitution() throws Throwable {
+ final nsIDOMElement rst = performTestForRichFacesComponent(file);
+
+ assertNotNull(rst);
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_SPAN);
+
+ assertEquals("Size should be equals 1", 1, elements.size());
+
+ final nsIDOMElement spanOne = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style attribute should be substituted",
"Hello", spanOne.getFirstChild().getNodeValue());
+
+ }
+
+ /**
+ * Gets the open page name.
+ *
+ * @return the open page name
+ */
+ protected String getOpenPageName() {
+ return PAGE_1;
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2582Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-07-29
16:48:43 UTC (rev 9402)
+++
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-07-29
16:49:34 UTC (rev 9403)
@@ -42,6 +42,7 @@
suite.addTestSuite(VpeTemplateManagerTest.class);
suite.addTestSuite(ElPreferencesTestCase.class);
suite.addTestSuite(JBIDE2010Test.class);
+ suite.addTestSuite(JBIDE2582Test.class);
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
ImportBean importBean = new ImportBean();