Author: akazakov
Date: 2012-01-17 20:04:39 -0500 (Tue, 17 Jan 2012)
New Revision: 37924
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10660 JSF EL validation is not scoped correctly
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2012-01-18
00:51:35 UTC (rev 37923)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2012-01-18
01:04:39 UTC (rev 37924)
@@ -46,7 +46,8 @@
<h:dataTable value="#{tipos}" var="_a"
border="#{_a.name}"/>
<h:dataTable value="#{testComponentForVars}" var="_a"
border="#{_a.items}"/>
- <h:dataTable value="#{tipos}" var="_a"
border="#{_a.nonExistingBroken}"/>
+ <h:dataTable value="#{tipos.nonExistingBroken}"/>
+
</ui:define>
</ui:composition>
\ No newline at end of file
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2012-01-18
00:51:35 UTC (rev 37923)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2012-01-18
01:04:39 UTC (rev 37924)
@@ -129,11 +129,18 @@
assertMarkerIsNotCreated(testJSP, MARKER_TYPE, "actor cannot be resolved");
}
- public void testVarAttributes() throws CoreException {
+ public void testVarAttributes() throws CoreException, ValidationException {
// Test for
http://jira.jboss.com/jira/browse/JBIDE-999
IFile file = project.getFile("WebContent/varAttributes.xhtml");
int number = getMarkersNumberByGroupName(file,
SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP);
- assertEquals(1, number);
+ assertMarkerIsCreatedForLineOfFile("WebContent/varAttributes.xhtml",
ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[]{"nonExistingBroken"},
+ 49);
+ assertMarkerIsCreatedForLineOfFile("WebContent/varAttributes.xhtml",
ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[]{"nonExistingBroken"},
+ 50);
+
+ assertEquals(2, number);
}
public void testMessageBundles() throws CoreException {
@@ -217,6 +224,11 @@
16);
}
+ private void assertMarkerIsCreatedForLineOfFile(String path, String markerTemplate,
Object[] parameters, int lineNumber) throws CoreException, ValidationException {
+ IValidatorSupport validator = new SeamCoreValidatorWrapper(project);
+ assertMarkerIsCreatedForLine(validator,path,markerTemplate,parameters,lineNumber);
+ }
+
private void assertMarkerIsCreatedForLine(String target, String newContent, String
markerTemplate,
Object[] parameters,int lineNumber) throws CoreException, ValidationException {
IValidatorSupport validator = new SeamCoreValidatorWrapper(project);