Author: akazakov
Date: 2012-01-18 14:56:05 -0500 (Wed, 18 Jan 2012)
New Revision: 37952
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:44:21 UTC (rev 37951)
+++
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)
@@ -67,11 +67,18 @@
change = new TestTextChange(601, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
-
+
+ sourceFile =
project.getProject().getFile("/WebContent/pages/syntaxErrors.xhtml");
+ sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
+ position = sourceFileContent.indexOf("user.name");
+ structure = new TestChangeStructure(project,
"/WebContent/pages/syntaxErrors.xhtml");
+ change = new TestTextChange(position, NAME_LEN, NEW_NAME);
+ structure.addTextChange(change);
+ list.add(structure);
+
RenameELVariableProcessor processor = new RenameELVariableProcessor(sourceFile,
"user");
processor.setNewName(NEW_NAME);
checkRename(processor, list);
}
-
-}
+}
\ No newline at end of file
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:44:21 UTC (rev 37951)
+++
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)
@@ -253,7 +253,7 @@
* @throws ValidationException
*/
public void testSyntaxErrors() throws CoreException, ValidationException {
- IFile file = project.getFile("WebContent/pages/syntaxErrors.jsp");
+ IFile file = project.getFile("WebContent/pages/syntaxErrors.xhtml");
TestUtil.validate(file);