Author: mareshkau
Date: 2008-10-03 10:19:16 -0400 (Fri, 03 Oct 2008)
New Revision: 10659
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
=JBIDE-1169
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-10-03
14:06:43 UTC (rev 10658)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-10-03
14:19:16 UTC (rev 10659)
@@ -18,7 +18,10 @@
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.richfaces,
org.mozilla.xpcom,
- org.jboss.tools.vpe.ui.test
+ org.jboss.tools.vpe.ui.test,
+ org.jboss.tools.vpe.resref;bundle-version="2.0.0",
+ org.jboss.tools.common.el.ui;bundle-version="1.0.0",
+ org.jboss.tools.common.el.core;bundle-version="2.0.0"
Eclipse-LazyStart: true
Bundle-ClassPath: vpe-rf-test.jar
Export-Package: org.jboss.tools.jsf.vpe.richfaces.test
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03
14:06:43 UTC (rev 10658)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03
14:19:16 UTC (rev 10659)
@@ -26,6 +26,7 @@
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1614Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1639Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1682Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.RichFacesJBIDE1169Test;
import org.jboss.tools.tests.ImportBean;
import org.jboss.tools.vpe.ui.test.VpeTestSetup;
@@ -53,6 +54,7 @@
suite.addTestSuite(Jbide1682Test.class);
suite.addTestSuite(Jbide1548Test.class);
suite.addTestSuite(JBIDE1713Test.class);
+ suite.addTestSuite(RichFacesJBIDE1169Test.class);
suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java 2008-10-03
14:19:16 UTC (rev 10659)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+* Copyright (c) 2007-2008 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.richfaces.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.richfaces.test.RichFacesAllTests;
+import org.jboss.tools.vpe.editor.util.ElService;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * @author mareshkau
+ * Test Case For JBIDE-1169
+ */
+public class RichFacesJBIDE1169Test extends VpeTest{
+
+ private String RICH_FACES_SKIN_KEY = "org.richfaces.SKIN"; //$NON-NLS-1$
+
+ private String SKIN_VALUE = "ruby"; //$NON-NLS-1$
+
+ private IFile testFile;
+
+ public RichFacesJBIDE1169Test(String name) {
+ super(name);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ResourceReference[] entries = new ResourceReference[1];
+ testFile = (IFile) TestUtil.getComponentPath(
+ "JBIDE/1169/test.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME);
//$NON-NLS-1$
+ entries[0] = new
ResourceReference(RICH_FACES_SKIN_KEY,ResourceReference.PROJECT_SCOPE);
+ entries[0].setProperties(SKIN_VALUE);
+ ELReferenceList.getInstance().setAllResources(testFile, entries);
+ //clear exception
+ setException(null);
+ }
+
+ public void testJBIDE1169() {
+ String replacedValue =
ElService.getInstance().replaceEl(testFile,"#{"+RICH_FACES_SKIN_KEY+'}');
//$NON-NLS-1$
+ assertEquals("Skin value should be equals",SKIN_VALUE, replacedValue);
//$NON-NLS-1$
+ }
+ /**
+ * Tear down.
+ *
+ * @throws Exception the exception
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ if(getException()!=null) {
+ throw new Exception(getException());
+ }
+ ELReferenceList.getInstance().setAllResources(testFile, new
ResourceReference[0]);
+ testFile = null;
+ super.tearDown();
+ }
+}