Merged HEAD (5.2) to 5.2.N (5.2.1)

126542 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      123495 jvonka: Nodes (FileFolder) API - add optional relativePath (to make folders) when creating a folder, empty file or other custom node
      RA-703


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126887 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:04:50 +00:00
parent f294882433
commit 7925bca309
4 changed files with 186 additions and 38 deletions

View File

@@ -37,6 +37,8 @@ import static org.junit.Assert.assertTrue;
/**
* Representation of a node - initially for client tests for Nodes (aka File Folder) API
*
* TODO push null check down into AssertUtil (making sure that no other existing tests break)
*
* @author janv
*/
public class Node
@@ -65,6 +67,8 @@ public class Node
protected List<String> allowableOperations;
protected String relativePath; // optionally used in create node request
public Node()
{
}
@@ -219,6 +223,16 @@ public class Node
this.allowableOperations = allowableOperations;
}
public String getRelativePath()
{
return relativePath;
}
public void setRelativePath(String relativePath)
{
this.relativePath = relativePath;
}
public void expected(Object o)
{
Node other = (Node) o;
@@ -336,5 +350,14 @@ public class Node
{
assertNull(other.getAllowableOperations());
}
if (relativePath != null)
{
assertEquals(relativePath, other.getRelativePath());
}
else
{
assertNull(other.getRelativePath());
}
}
}