Revert "RM-6865 code review changes"

This reverts commit b4bc9195
This commit is contained in:
Ross Gale
2019-06-19 10:57:08 +01:00
parent b4bc91950b
commit 8daac2d403

View File

@@ -44,6 +44,7 @@ import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.FORBIDDEN; import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.NOT_FOUND; import static org.springframework.http.HttpStatus.NOT_FOUND;
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY; import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertTrue;
@@ -51,6 +52,7 @@ import java.util.List;
import org.alfresco.dataprep.CMISUtil; import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.rm.community.base.BaseRMRestTest; import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory; import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild; import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild;
@@ -278,13 +280,13 @@ public class DeclareAndFileDocumentAsRecordTests extends BaseRMRestTest
public void declareAndFileToValidLocationUsingFilesAPI() throws Exception public void declareAndFileToValidLocationUsingFilesAPI() throws Exception
{ {
STEP("Declare document as record with a location parameter value"); STEP("Declare document as record with a location parameter value");
getRestAPIFactory().getFilesAPI(userFillingPermission) Record record = getRestAPIFactory().getFilesAPI(userFillingPermission)
.usingParams(String.format("%s=%s", PARENT_ID_PARAM, recordFolder.getId())) .usingParams(String.format("%s=%s", PARENT_ID_PARAM, recordFolder.getId()))
.declareAsRecord(testFile.getNodeRefWithoutVersion()); .declareAsRecord(testFile.getNodeRefWithoutVersion());
assertStatusCode(CREATED); assertStatusCode(CREATED);
STEP("Verify the declared record is placed in the record folder"); STEP("Verify the declared record is placed in the record folder");
assertTrue(isMatchingRecordInRecordFolder(testFile, recordFolder), "Record should be filed to record folder"); assertEquals(record.getParentId(), recordFolder.getId(), "Record should be filed to record folder");
STEP("Verify the document in collaboration site is now a record"); STEP("Verify the document in collaboration site is now a record");
assertTrue(hasRecordAspect(testFile), "File should have record aspect"); assertTrue(hasRecordAspect(testFile), "File should have record aspect");