mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added QName indexed Properties to AVMNodes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3357 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,6 +29,8 @@ import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.alfresco.repo.avm.util.BulkLoader;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Big test of AVM behavior.
|
||||
@@ -2018,4 +2020,28 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test properties.
|
||||
*/
|
||||
public void testProperties()
|
||||
{
|
||||
try
|
||||
{
|
||||
setupBasicTree();
|
||||
QName name = QName.createQName("silly.uri", "SillyProperty");
|
||||
PropertyValue value = new PropertyValue(name, "Silly Property Value");
|
||||
fService.setProperty("main:/a/b/c/foo", name, value);
|
||||
fService.createSnapshot("main");
|
||||
PropertyValue returned = fService.getProperty(-1, "main:/a/b/c/foo", name);
|
||||
assertEquals(value.toString(), returned.toString());
|
||||
Map<QName, PropertyValue> props = fService.getProperties(-1, "main:/a/b/c/foo");
|
||||
assertEquals(1, props.size());
|
||||
assertEquals(value.toString(), props.get(name).toString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user