mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added test for IDEA-142882
This commit is contained in:
@@ -79,6 +79,22 @@ public class LibraryTest extends ModuleRootManagerTestCase {
|
||||
assertSame(a, getLibraryTable().getLibraryByName("b"));
|
||||
}
|
||||
|
||||
public void testFindLibraryByNameAfterChainedRename() {
|
||||
Library a = createLibrary("a", null, null);
|
||||
Library b = createLibrary("b", null, null);
|
||||
assertSame(a, getLibraryTable().getLibraryByName("a"));
|
||||
assertSame(b, getLibraryTable().getLibraryByName("b"));
|
||||
Library.ModifiableModel bModel = b.getModifiableModel();
|
||||
bModel.setName("c");
|
||||
commit(bModel);
|
||||
Library.ModifiableModel aModel = a.getModifiableModel();
|
||||
aModel.setName("b");
|
||||
commit(aModel);
|
||||
assertNull(getLibraryTable().getLibraryByName("a"));
|
||||
assertSame(a, getLibraryTable().getLibraryByName("b"));
|
||||
assertSame(b, getLibraryTable().getLibraryByName("c"));
|
||||
}
|
||||
|
||||
public void testReloadLibraryTable() {
|
||||
((LibraryTableBase)getLibraryTable()).loadState(new Element("component"));
|
||||
createLibrary("a", null, null);
|
||||
|
||||
Reference in New Issue
Block a user