Author: dgeraskov
Date: 2008-02-13 04:33:10 -0500 (Wed, 13 Feb 2008)
New Revision: 6291
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1558
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java 2008-02-13
09:33:05 UTC (rev 6290)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/RefactoringTest.java 2008-02-13
09:33:10 UTC (rev 6291)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.hibernate.eclipse.console.test;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -123,7 +124,12 @@
try {
IPath newPath = generateNewPathForSegment(i);
String oldMemento = runtimeClasspathEntries[j].getMemento();
- String newMemento = HibernateRefactoringUtil.getUpdatedMemento(oldMemento, newPath,
oldPathPart);
+ List<String> oldMementos = new ArrayList<String>();
+ List<String> newMementos = new ArrayList<String>();
+ oldMementos.add(runtimeClasspathEntries[j].getMemento());
+ boolean isChanged = HibernateRefactoringUtil.updateClasspathEntries(new
IRuntimeClasspathEntry[]{runtimeClasspathEntries[j]}, oldMementos, newMementos,
oldPathPart, newPath);
+ assertTrue(isChanged);
+ String newMemento = newMementos.get(0);
checkMementoChanged(oldMemento, newMemento, oldPathPart, newPath);
} catch (CoreException e) {
fail("CoreException occured when try to work with memento." +
e.getMessage());