mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
tidy up code, add java docs
This commit is contained in:
@@ -198,7 +198,7 @@ public class FilePlanTests extends BaseRestTest
|
||||
// Authenticate with admin user
|
||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
|
||||
// Build the file plan root properties
|
||||
// Build object for updating the filePlan
|
||||
FilePlanComponent filePlanComponent= new FilePlanComponent();
|
||||
FilePlanComponentProperties filePlanComponentProperties=new FilePlanComponentProperties(FILE_PLAN_TITLE, FILE_PLAN_DESCRIPTION);
|
||||
filePlanComponent.setProperties(filePlanComponentProperties);
|
||||
@@ -295,9 +295,9 @@ public class FilePlanTests extends BaseRestTest
|
||||
|
||||
// Authenticate with admin user
|
||||
rmSiteAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
|
||||
// Get the RM site ID
|
||||
String rmSiteId = rmSiteAPI.getSite().getGuid();
|
||||
|
||||
String name = filePlanAlias + getRandomAlphanumeric();
|
||||
|
||||
// Build the file plan root properties
|
||||
@@ -305,6 +305,7 @@ public class FilePlanTests extends BaseRestTest
|
||||
|
||||
// Authenticate with admin user
|
||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
|
||||
// Create the special containers into RM site - parent folder
|
||||
filePlanComponentAPI.createFilePlanComponent(filePlanComponent, rmSiteId);
|
||||
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(UNPROCESSABLE_ENTITY);
|
||||
|
@@ -340,14 +340,17 @@ public class RecordCategoryTest extends BaseRestTest
|
||||
public void createTypesNotAllowedInCategory(String nodeType) throws Exception
|
||||
{
|
||||
String COMPONENT_NAME="Component"+getRandomAlphanumeric();
|
||||
// Authenticate with admin user
|
||||
|
||||
// Authenticate with admin user
|
||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
|
||||
//Create the category
|
||||
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), COMPONENT_NAME);
|
||||
|
||||
//Build node properties
|
||||
FilePlanComponent recordCategory = new FilePlanComponent(COMPONENT_NAME,nodeType,
|
||||
new FilePlanComponentProperties("Title for " + COMPONENT_NAME));
|
||||
new FilePlanComponentProperties("Title for " + COMPONENT_NAME));
|
||||
|
||||
//create the invalid node type
|
||||
filePlanComponentAPI.createFilePlanComponent(recordCategory, category.getId());
|
||||
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(UNPROCESSABLE_ENTITY);
|
||||
|
@@ -197,7 +197,10 @@ public class RecordFolderTests extends BaseRestTest
|
||||
String CATEGORY = CATEGORY_NAME + getRandomAlphanumeric();
|
||||
// Authenticate with admin user
|
||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
//Create a record category
|
||||
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), CATEGORY);
|
||||
|
||||
//Create a record folder
|
||||
FilePlanComponent folder = createFolder(category.getId(), FOLDER_NAME);
|
||||
|
||||
// Create record category first
|
||||
@@ -206,13 +209,13 @@ public class RecordFolderTests extends BaseRestTest
|
||||
String folderTitle = "Update title " + getRandomAlphanumeric();
|
||||
String location="Location"+getRandomAlphanumeric();
|
||||
|
||||
String review_period="month|1";
|
||||
|
||||
//Create the file plan component properties to update
|
||||
FilePlanComponentProperties filePlanComponentProperties= new FilePlanComponentProperties(folderTitle, folderDescription);
|
||||
filePlanComponentProperties.setVitalRecord(true);
|
||||
filePlanComponentProperties.setReviewPeriod( new ReviewPeriod("month","1"));
|
||||
filePlanComponentProperties.setLocation(location);
|
||||
FilePlanComponent recordFolder = new FilePlanComponent(folderName,filePlanComponentProperties);
|
||||
|
||||
// Update the record category
|
||||
FilePlanComponent folderUpdated = filePlanComponentAPI.updateFilePlanComponent(recordFolder, folder.getId());
|
||||
|
||||
@@ -246,8 +249,12 @@ public class RecordFolderTests extends BaseRestTest
|
||||
|
||||
// Authenticate with admin user
|
||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||
// Create the record category
|
||||
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), CATEGORY);
|
||||
|
||||
// Create the record folder
|
||||
FilePlanComponent folder = createFolder(category.getId(), FOLDER_NAME);
|
||||
|
||||
// Delete the Record folder
|
||||
filePlanComponentAPI.deleteFilePlanComponent(folder.getId());
|
||||
// Check the Response Status Code
|
||||
|
@@ -206,7 +206,8 @@ public class UnfiledRecordsFolderTests extends BaseRestTest
|
||||
|
||||
assertEquals(childFolder.getName(), childFolderName);
|
||||
assertEquals(childFolder.getNodeType(), UNFILED_RECORD_FOLDER_TYPE.toString());
|
||||
// assertFalse(childFolder.isHasRetentionSchedule());
|
||||
// FIXME: TO DO investigate. Has Retention schedule is not returned!!
|
||||
//assertFalse(childFolder.isHasRetentionSchedule());
|
||||
|
||||
assertEquals(childFolder.getCreatedByUser().getId(), dataUser.getAdminUser().getUsername());
|
||||
|
||||
|
Reference in New Issue
Block a user