Author: akazakov
Date: 2012-01-18 15:08:18 -0500 (Wed, 18 Jan 2012)
New Revision: 37953
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10661 Incorrect validation of ELs with syntax
errors
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18
19:56:05 UTC (rev 37952)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18
20:08:18 UTC (rev 37953)
@@ -70,7 +70,7 @@
sourceFile =
project.getProject().getFile("/WebContent/pages/syntaxErrors.xhtml");
sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
- position = sourceFileContent.indexOf("user.name");
+ position = sourceFileContent.indexOf("user");
structure = new TestChangeStructure(project,
"/WebContent/pages/syntaxErrors.xhtml");
change = new TestTextChange(position, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18
19:56:05 UTC (rev 37952)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18
20:08:18 UTC (rev 37953)
@@ -18,6 +18,7 @@
import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.common.el.core.ElCoreMessages;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.validation.ContextValidationHelper;
import org.jboss.tools.common.validation.IProjectValidationContext;
@@ -257,9 +258,10 @@
TestUtil.validate(file);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file,
ELValidationMessages.EL_SYNTAX_ERROR, true, 7, 8);
+ String messagePattern =
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new
Object[]{ElCoreMessages.ExpressionRule_ExpectingJavaName});
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, messagePattern, false, 7, 8);
- String messagePattern =
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new
Object[]{"abc."});
+ messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME,
new Object[]{"abc."});
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, messagePattern, 7);
messagePattern =
MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new
Object[]{"broken"});