mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge RM-4159_EnterpriseReSTTests into RM-4339_RestTestsGuideTopicApi.
This commit is contained in:
@@ -67,6 +67,11 @@ public class RestAPIFactory
|
|||||||
return this.rmRestWrapper;
|
return this.rmRestWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRmRestWrapper(RMRestWrapper rmRestWrapper)
|
||||||
|
{
|
||||||
|
this.rmRestWrapper = rmRestWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
private RestIGCoreAPI getRestIGCoreAPI(UserModel userModel)
|
private RestIGCoreAPI getRestIGCoreAPI(UserModel userModel)
|
||||||
{
|
{
|
||||||
getRmRestWrapper().authenticateUser(userModel != null ? userModel : dataUser.getAdminUser());
|
getRmRestWrapper().authenticateUser(userModel != null ? userModel : dataUser.getAdminUser());
|
||||||
|
@@ -100,7 +100,7 @@ public class BaseRMRestTest extends RestTest
|
|||||||
*/
|
*/
|
||||||
protected void assertStatusCode(HttpStatus statusCode)
|
protected void assertStatusCode(HttpStatus statusCode)
|
||||||
{
|
{
|
||||||
getRestAPIFactory().getRmRestWrapper().assertStatusCodeIs(statusCode);
|
restAPIFactory.getRmRestWrapper().assertStatusCodeIs(statusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,7 +145,7 @@ public class BaseRMRestTest extends RestTest
|
|||||||
*/
|
*/
|
||||||
public void createRMSiteIfNotExists() throws Exception
|
public void createRMSiteIfNotExists() throws Exception
|
||||||
{
|
{
|
||||||
RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI();
|
RMSiteAPI rmSiteAPI = restAPIFactory.getRMSiteAPI();
|
||||||
|
|
||||||
// Check RM site doesn't exist
|
// Check RM site doesn't exist
|
||||||
if (!rmSiteAPI.existsRMSite())
|
if (!rmSiteAPI.existsRMSite())
|
||||||
@@ -294,16 +294,16 @@ public class BaseRMRestTest extends RestTest
|
|||||||
assertTrue(aspects.contains(RECORD_TYPE));
|
assertTrue(aspects.contains(RECORD_TYPE));
|
||||||
// a record mustn't be closed
|
// a record mustn't be closed
|
||||||
assertFalse(aspects.contains(ASPECTS_CLOSED_RECORD));
|
assertFalse(aspects.contains(ASPECTS_CLOSED_RECORD));
|
||||||
|
|
||||||
// add closed record aspect
|
// add closed record aspect
|
||||||
aspects.add(ASPECTS_CLOSED_RECORD);
|
aspects.add(ASPECTS_CLOSED_RECORD);
|
||||||
|
|
||||||
FilePlanComponent updatedComponent = filePlanComponentsAPI.updateFilePlanComponent(FilePlanComponent.builder().aspectNames(aspects).build(),
|
FilePlanComponent updatedComponent = filePlanComponentsAPI.updateFilePlanComponent(FilePlanComponent.builder().aspectNames(aspects).build(),
|
||||||
recordToClose.getId());
|
recordToClose.getId());
|
||||||
assertStatusCode(OK);
|
assertStatusCode(OK);
|
||||||
return updatedComponent;
|
return updatedComponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method to create a randomly-named <category>/<folder> structure in file plan
|
* Helper method to create a randomly-named <category>/<folder> structure in file plan
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user