mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
refactoring
This commit is contained in:
@@ -141,7 +141,7 @@ public class BaseRMRestTest extends RestTest
|
||||
|
||||
/** Valid root containers where electronic and non-electronic records can be created */
|
||||
@DataProvider(name = "validRootContainers")
|
||||
public String[][] getValidRootContainers() throws Exception
|
||||
public Object[][] getValidRootContainers() throws Exception
|
||||
{
|
||||
return new String[][]
|
||||
{
|
||||
@@ -655,19 +655,17 @@ public class BaseRMRestTest extends RestTest
|
||||
try
|
||||
{
|
||||
this.wait(waitInMilliSeconds);
|
||||
} catch (InterruptedException e)
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
List<SearchNodeModel> searchResults = getRestAPIFactory().getRmRestWrapper().withSearchAPI().search(query)
|
||||
.getEntries();
|
||||
if ((searchResults != null && !searchResults.isEmpty()))
|
||||
if (searchResults != null && !searchResults.isEmpty())
|
||||
{
|
||||
searchResults.forEach(childNode ->
|
||||
{
|
||||
names.add(childNode.onModel().getName());
|
||||
});
|
||||
searchResults.forEach(childNode -> names.add(childNode.onModel().getName()));
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -675,7 +673,7 @@ public class BaseRMRestTest extends RestTest
|
||||
counter++;
|
||||
}
|
||||
// double wait time to not overdo solr search
|
||||
waitInMilliSeconds = (waitInMilliSeconds * 2);
|
||||
waitInMilliSeconds = waitInMilliSeconds * 2;
|
||||
}
|
||||
return names;
|
||||
}
|
||||
@@ -722,7 +720,7 @@ public class BaseRMRestTest extends RestTest
|
||||
counter++;
|
||||
}
|
||||
// double wait time to not overdo solr search
|
||||
waitInMilliSeconds = (waitInMilliSeconds * 2);
|
||||
waitInMilliSeconds = waitInMilliSeconds * 2;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
|
||||
/** Invalid parent containers where electronic records can't be created */
|
||||
@DataProvider(name = "invalidParentContainers")
|
||||
public Object[][] invalidParentContainers() throws Exception
|
||||
public Object[][] invalidParentContainers()
|
||||
{
|
||||
return new String[][]
|
||||
{
|
||||
@@ -99,7 +99,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
dataProvider = "invalidParentContainers",
|
||||
description = "Electronic records can't be created in invalid parent containers"
|
||||
)
|
||||
public void cantCreateElectronicRecordsInInvalidContainers(String container) throws Exception
|
||||
public void cantCreateElectronicRecordsInInvalidContainers(String container)
|
||||
{
|
||||
// Create an electronic record in the given container, this should throw an IllegalArgumentException
|
||||
getRestAPIFactory().getRecordFolderAPI().createRecord(createElectronicRecordModel(), container, getFile(IMAGE_FILE));
|
||||
@@ -158,7 +158,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
* Then nothing happens
|
||||
* And an error is reported
|
||||
* </pre>
|
||||
* @param folderid The folder, which the record will be created in
|
||||
* @param folderId The folder, which the record will be created in
|
||||
* @param type The type of the record folder, which the record will be created in
|
||||
* @throws Exception if record can't be created
|
||||
*/
|
||||
@@ -405,7 +405,7 @@ public class ElectronicRecordTests extends BaseRMRestTest
|
||||
*/
|
||||
@Test(description = "Electronic records can be created in record folder with duplicate name")
|
||||
@Bug(id ="RM-5116, RM-5012")
|
||||
public void canCreateElectronicRecordsWithDuplicateName() throws Exception
|
||||
public void canCreateElectronicRecordsWithDuplicateName()
|
||||
{
|
||||
RecordCategoryChild recordFolder = createCategoryFolderInFilePlan();
|
||||
|
||||
|
Reference in New Issue
Block a user