Lines 517-526
Link Here
|
517 |
|
517 |
|
518 |
assertEquals("was supposed to pass", null, performRefactoring(refactoring)); |
518 |
assertEquals("was supposed to pass", null, performRefactoring(refactoring)); |
519 |
assertEqualLines("invalid renaming A", getFileContents(getOutputTestFileName("A")), cu.getSource()); |
519 |
assertEqualLines("invalid renaming A", getFileContents(getOutputTestFileName("A")), cu.getSource()); |
520 |
} |
520 |
} |
521 |
|
521 |
|
|
|
522 |
public void test41() throws Exception { // test for bug 351410 |
523 |
ICompilationUnit cu= createCUfromTestFile(getPackageP(), "A"); |
524 |
IMethod method= cu.getType("A").getMethod("getName", new String[0]); |
525 |
|
526 |
final RenameJavaElementDescriptor descriptor= RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_METHOD); |
527 |
descriptor.setJavaElement(method); |
528 |
descriptor.setNewName("getSomething"); |
529 |
descriptor.setUpdateReferences(true); |
530 |
final RefactoringStatus status= new RefactoringStatus(); |
531 |
final Refactoring refactoring= descriptor.createRefactoring(status); |
532 |
assertNotNull("Refactoring should not be null", refactoring); |
533 |
assertTrue("status should be ok", status.isOK()); |
534 |
|
535 |
assertEquals("was supposed to pass", null, performRefactoring(refactoring)); |
536 |
assertEqualLines("invalid renaming A", getFileContents(getOutputTestFileName("A")), cu.getSource()); |
537 |
} |
538 |
|
522 |
//anonymous inner class |
539 |
//anonymous inner class |
523 |
public void testAnon0() throws Exception{ |
540 |
public void testAnon0() throws Exception{ |
524 |
helper2(); |
541 |
helper2(); |
525 |
} |
542 |
} |
526 |
|
543 |
|