[jbosstools-commits] JBoss Tools SVN: r44123 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 28 15:36:54 EDT 2012
Author: akazakov
Date: 2012-09-28 15:36:54 -0400 (Fri, 28 Sep 2012)
New Revision: 44123
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/FacesConfigValidatorTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-12759 org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest failure
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/FacesConfigValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/FacesConfigValidatorTest.java 2012-09-28 18:51:05 UTC (rev 44122)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/FacesConfigValidatorTest.java 2012-09-28 19:36:54 UTC (rev 44123)
@@ -14,9 +14,8 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.jsf.model.JSFConstants;
import org.jboss.tools.jsf.web.validation.JSFValidationMessage;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -42,9 +41,9 @@
}
public void testNavigation() throws Exception {
- ValidationFramework.getDefault().validate(new IProject[] {project}, false, false, new NullProgressMonitor());
IResource resource = project.findMember("/WebContent/WEB-INF/faces-config.xml"); //$NON-NLS-1$
assertTrue(resource.exists());
+ TestUtil.validate(resource);
AbstractResourceMarkerTest.assertMarkerIsCreated(resource, NLS.bind(JSFValidationMessage.VIEW_ID_NO_SLASH, JSFConstants.ATT_FROM_VIEW_ID), 23);
AbstractResourceMarkerTest.assertMarkerIsCreated(resource, NLS.bind(JSFValidationMessage.TO_VIEW_ID_STAR, JSFConstants.ATT_TO_VIEW_ID), 26);
AbstractResourceMarkerTest.assertMarkerIsCreated(resource, NLS.bind(JSFValidationMessage.VIEW_NOT_EXISTS, JSFConstants.ATT_TO_VIEW_ID, "/pages/greeting3.xhtml"), 30, 42);
@@ -52,5 +51,4 @@
AbstractResourceMarkerTest.assertMarkerIsNotCreated(resource, NLS.bind(JSFValidationMessage.VIEW_NOT_EXISTS, JSFConstants.ATT_TO_VIEW_ID, "/pages/#{aaa.bbb}"), 38);
AbstractResourceMarkerTest.assertMarkerIsCreated(resource, NLS.bind(JSFValidationMessage.VIEW_NOT_EXISTS, JSFConstants.ATT_FROM_VIEW_ID, "/pages/inputname222.xhtml"), 46);
}
-
}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java 2012-09-28 18:51:05 UTC (rev 44122)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java 2012-09-28 19:36:54 UTC (rev 44123)
@@ -21,9 +21,8 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
import org.jboss.tools.jsf.web.validation.JSFValidationMessage;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -59,8 +58,8 @@
}
public void testJSF2ComponentsValidator() throws Exception {
- ValidationFramework.getDefault().validate(new IProject[] {project}, false, false, new NullProgressMonitor());
IResource resource = project.findMember("/WebContent/pages/inputname.xhtml"); //$NON-NLS-1$
+ TestUtil.validate(resource);
assertTrue(resource.exists());
IMarker[] markers = resource.findMarkers("org.jboss.tools.jsf.compositeproblem", false, 1); //$NON-NLS-1$
assertEquals(3, markers.length);
@@ -70,9 +69,9 @@
}
public void testELInTagBodyInCompositeComponent() throws Exception {
- ValidationFramework.getDefault().validate(new IProject[] {project}, false, false, new NullProgressMonitor());
IResource resource = project.findMember("/WebContent/resources/demo/input.xhtml"); //$NON-NLS-1$
assertTrue(resource.exists());
+ TestUtil.validate(resource);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(resource, "\"name\" cannot be resolved", 20);
AbstractResourceMarkerTest.assertMarkerIsCreated(resource, "\"nameBroken\" cannot be resolved", 21);
}
More information about the jbosstools-commits
mailing list