mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4615: TAS implementation of FilePlanComponentAPI.createElectronicRecord()
This commit is contained in:
@@ -87,11 +87,12 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
@Test
|
||||
(
|
||||
dataProvider = "invalidParentContainers",
|
||||
description = "Electronic records can't be created in invalid parent containers"
|
||||
description = "Electronic records can't be created in invalid parent containers",
|
||||
expectedExceptions = IllegalArgumentException.class
|
||||
)
|
||||
public void cantCreateElectronicRecordsInInvalidContainers(FilePlanComponent container) throws Exception
|
||||
{
|
||||
// Build object the filePlan
|
||||
// Build object the filePlan, this should throw an IllegalArgumentException
|
||||
getRestAPIFactory().getFilePlanComponentsAPI().createElectronicRecord(createElectronicRecordModel(), IMAGE_FILE, container.getId());
|
||||
|
||||
// verify the create request status code
|
||||
@@ -108,7 +109,11 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
* </pre>
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test(description = "Electronic record can't be created in closed record folder")
|
||||
@Test
|
||||
(
|
||||
description = "Electronic record can't be created in closed record folder",
|
||||
expectedExceptions = IllegalArgumentException.class
|
||||
)
|
||||
public void cantCreateElectronicRecordInClosedFolder() throws Exception
|
||||
{
|
||||
FilePlanComponent recordFolder = createCategoryFolderInFilePlan();
|
||||
@@ -119,7 +124,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
// close the folder
|
||||
closeFolder(recordFolder.getId());
|
||||
|
||||
// try to create it, this should fail
|
||||
// try to create it, this should throw IllegalArgumentException
|
||||
getRestAPIFactory().getFilePlanComponentsAPI().createElectronicRecord(createElectronicRecordModel(), IMAGE_FILE, recordFolder.getId());
|
||||
|
||||
// verify the status code
|
||||
|
Reference in New Issue
Block a user