mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Changed AVMNodeConverter.ToAVMVersionPath() to return a
Pair<Integer, String>. Fixed avm.jsp which got busted by last checkin. Added implementation of AddChild to AVMNodeService. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3983 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
package org.alfresco.repo.avm;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -36,15 +37,15 @@ public class AVMNodeConverterTest extends TestCase
|
||||
int version = 2;
|
||||
NodeRef nodeRef = AVMNodeConverter.ToNodeRef(version, avmPath);
|
||||
System.out.println(nodeRef);
|
||||
Object [] backOut = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
assertEquals(2, ((Integer)backOut[0]).intValue());
|
||||
assertEquals(avmPath, (String)backOut[1]);
|
||||
Pair<Integer, String> backOut = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
assertEquals(2, backOut.getFirst().intValue());
|
||||
assertEquals(avmPath, backOut.getSecond());
|
||||
avmPath = "main:/fista/mista/wisticuff";
|
||||
version = -1;
|
||||
nodeRef = AVMNodeConverter.ToNodeRef(version, avmPath);
|
||||
System.out.println(nodeRef);
|
||||
backOut = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
assertEquals(-1, ((Integer)backOut[0]).intValue());
|
||||
assertEquals(avmPath, (String)backOut[1]);
|
||||
assertEquals(-1, backOut.getFirst().intValue());
|
||||
assertEquals(avmPath, backOut.getSecond());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user