Author: akazakov
Date: 2011-07-01 18:44:23 -0400 (Fri, 01 Jul 2011)
New Revision: 32539
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.project
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/.jsdtscope
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/TestWebContent/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/TestWebContent/inputname.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/inputname.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9286
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.classpath
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.classpath 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
6.x Runtime">
+ <attributes>
+ <attribute name="owner.project.facets"
value="jst.jsf;jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.project
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.project 2011-07-01 22:44:23
UTC (rev 32539)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jsf2pr</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/.jsdtscope
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/.jsdtscope
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/.jsdtscope 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.component 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="jsf2pr">
+ <wb-resource deploy-path="/"
source-path="/WebContent"/>
+ <wb-resource deploy-path="/"
source-path="/TestWebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+ <property name="context-root" value="jsf2pr"/>
+ <property name="java-output-path"
value="/jsf2pr/WebContent/WEB-INF/classes"/>
+ </wb-module>
+</project-modules>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,7 @@
+<root>
+ <facet id="jst.jsf">
+ <node name="libprov">
+ <attribute name="provider-id"
value="jsf-no-op-library-provider"/>
+ </node>
+ </facet>
+</root>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 6.x Runtime"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.jsf"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="jst.jsf" version="2.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.container
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.container 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.name
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/.settings/org.eclipse.wst.jsdt.ui.superType.name 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/resources.properties 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/resources.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/TestWebContent/inputname.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/TestWebContent/inputname.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/TestWebContent/inputname.xhtml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+
+ <h:outputText value="#{msgs.broken}" />
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/MANIFEST.MF
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/MANIFEST.MF 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/resources.properties 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/classes/resources.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/faces-config.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/faces-config.xml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+
xmlns="http://java.sun.com/xml/ns/javaee"
+
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_2_0.xsd"
+ version="2.0">
+
+ <navigation-rule>
+ <from-view-id>/pages/inputname.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <application>
+ <resource-bundle>
+ <base-name>resources</base-name>
+ <var>msgs</var>
+ </resource-bundle>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/web.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/web.xml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
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-app_3_0.xsd">
+ <display-name>jsf2pr</display-name>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/inputname.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/inputname.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/inputname.xhtml 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+
+ <h:outputText value="#{msgs.broken}" />
+</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-07-01
22:39:12 UTC (rev 32538)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-07-01
22:44:23 UTC (rev 32539)
@@ -16,12 +16,8 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.eclipse.wst.validation.Validator;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
import org.jboss.tools.jsf.model.pv.test.JSFPromptingProviderTest;
import org.jboss.tools.jsf.model.pv.test.JsfJbide7975Test;
@@ -31,9 +27,9 @@
import org.jboss.tools.jsf.test.refactoring.MessagePropertyRefactoringTest;
import org.jboss.tools.jsf.test.refactoring.MethodRefactoringTest;
import org.jboss.tools.jsf.test.validation.ELValidatorTest;
-import org.jboss.tools.jsf.test.validation.I18nValidatorTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsInClassFolderTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest;
+import org.jboss.tools.jsf.test.validation.WebContentTest;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -48,6 +44,7 @@
old.addTestSuite(JSFModelTest.class);
old.addTestSuite(ModelFormat_2_0_0_Test.class);
old.addTestSuite(JSFBeansTest.class);
+ suite.addTestSuite(WebContentTest.class);
suite.addTestSuite(XMLCatalogTest.class);
suite.addTestSuite(JSFPaletteTest.class);
suite.addTest(new ProjectImportTestSetup(old,
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java 2011-07-01
22:44:23 UTC (rev 32539)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.jsf.test.validation;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.jst.web.kb.internal.validation.ELValidationMessages;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class WebContentTest extends AbstractResourceMarkerTest {
+
+ protected static String PLUGIN_ID = "org.jboss.tools.jsf.test";
+ protected static String PROJECT_NAME = "jsf2pr";
+ protected static String PROJECT_PATH = "/projects/jsf2pr";
+ IProject project;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ if(!project.exists()) {
+ project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+
+ public void testWebContentValidation() throws CoreException {
+ IFile file = project.getFile("WebContent/input.xhtml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"broken"), 6);
+ file = project.getFile("TestWebContent/input.xhtml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
"broken"), 6);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain