Author: mareshkau
Date: 2010-01-21 12:00:32 -0500 (Thu, 21 Jan 2010)
New Revision: 19851
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MessageResolutionInPreviewTabTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5639
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml 2010-01-21
16:51:58 UTC (rev 19850)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml 2010-01-21
17:00:32 UTC (rev 19851)
@@ -2,7 +2,7 @@
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>demo.User</managed-bean-class>
@@ -12,4 +12,11 @@
<value />
</managed-property>
</managed-bean>
+ <behavior></behavior>
+ <application>
+ <resource-bundle>
+ <base-name>demo.Messages</base-name>
+ <var>msg</var>
+ </resource-bundle>
+ </application>
</faces-config>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MessageResolutionInPreviewTabTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MessageResolutionInPreviewTabTest.java 2010-01-21
16:51:58 UTC (rev 19850)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MessageResolutionInPreviewTabTest.java 2010-01-21
17:00:32 UTC (rev 19851)
@@ -18,8 +18,8 @@
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.mozilla.MozillaPreview;
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
import org.mozilla.interfaces.nsIDOMElement;
/**
@@ -28,7 +28,7 @@
* @author mareshkau
*
*/
-public class MessageResolutionInPreviewTabTest extends VpeTest {
+public class MessageResolutionInPreviewTabTest extends ComponentContentTest {
JSPMultiPageEditor part;
@@ -37,7 +37,7 @@
}
public void testMessageResolutionInPreviewTab() throws Throwable {
- setException(null);
+
IFile file = (IFile)
TestUtil.getComponentPath("JBIDE/5639/messageResolutionTest.jsp", //$NON-NLS-1$
JsfAllTests.IMPORT_I18N_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
@@ -57,15 +57,20 @@
}
nsIDOMElement contentArea = mozillaPreview.getContentArea();
assertEquals("The Message Should be from resource bundles","Guten
Tag!",contentArea.getFirstChild().getFirstChild().getNodeValue().trim());
//$NON-NLS-1$ //$NON-NLS-2$
- if(getException()!=null) {
- throw getException();
- }
+ part.pageChange(part.getVisualSourceIndex());
}
+ /**
+ * test for support web-facesconfig_2_0.xsd
+ * @throws Throwable
+ */
+ public void testMessageResolutionForJSF2Config() throws Throwable {
+ performContentTest("JBIDE/5639/message-resolution.xhtml"); //$NON-NLS-1$
+ }
+
@Override
- protected void tearDown() throws Exception {
- part.pageChange(part.getVisualSourceIndex());
- super.tearDown();
+ protected String getTestProjectName() {
+ return JsfAllTests.IMPORT_PROJECT_NAME;
}
}