mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added getPathsInStoreVersion() method to AVMService.
This returns all paths to a particular node in a particular store in a particular version. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6074 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,6 +101,45 @@ import org.alfresco.util.Pair;
|
||||
*/
|
||||
public class AVMServiceTest extends AVMServiceTestBase
|
||||
{
|
||||
/**
|
||||
* Test getStoreVersionRootPaths().
|
||||
*/
|
||||
public void testGetStoreVersionRootPaths()
|
||||
{
|
||||
try
|
||||
{
|
||||
setupBasicTree();
|
||||
AVMNodeDescriptor desc = fService.lookup(-1, "main:/a/b/c/foo");
|
||||
List<String> paths = fService.getPathsInStoreVersion(desc, "main", 1);
|
||||
assertEquals(1, paths.size());
|
||||
assertEquals("main:/a/b/c/foo", paths.get(0));
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
fService.getFileOutputStream("main:/a/b/c/foo").close();
|
||||
fService.createSnapshot("main", null, null);
|
||||
paths = fService.getPathsInStoreVersion(desc, "main", 1);
|
||||
assertEquals(1, paths.size());
|
||||
assertEquals("main:/a/b/c/foo", paths.get(0));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimal testing of Locking Aware service.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user