@Test public void testMoveKBFolderToParentKBFolderInKBFolder() throws Exception { KBFolder kbFolder = addKBFolder(_kbFolder.getKbFolderId()); KBFolder parentKBFolder = addKBFolder(_kbFolder.getKbFolderId()); KBFolderLocalServiceUtil.moveKBFolder(kbFolder.getKbFolderId(), parentKBFolder.getKbFolderId()); kbFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolder.getKbFolderId()); Assert.assertEquals(parentKBFolder.getKbFolderId(), kbFolder.getParentKBFolderId()); }
@Test public void testMoveKBFolderToParentKBFolderInHomeKBFolder() throws Exception { KBFolder kbFolder = addKBFolder(KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); KBFolder parentKBFolder = addKBFolder(KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); KBFolderLocalServiceUtil.moveKBFolder(kbFolder.getKbFolderId(), parentKBFolder.getKbFolderId()); kbFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolder.getKbFolderId()); Assert.assertEquals(parentKBFolder.getKbFolderId(), kbFolder.getParentKBFolderId()); }