mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ListAttribute seems to be mostly working, though I had to tweak hibernate-cfg.properties to
make it suck back generated primary keys. Restructured ListEntry so that most most gets are via Session.get() rather than by query. Added new methods to AttributeService to handle ListAttribute specific operations. Added a little more testing for AttributeService. I'm praying that the build will be repaired, since my efforts having been doing so much lately. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5553 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -111,6 +111,8 @@ public class AttributeServiceTest extends TestCase
|
||||
{
|
||||
System.out.println(key + " => " + fService.getAttribute(key));
|
||||
}
|
||||
fService.setAttribute("", "string", new StringAttributeValue("This is another string."));
|
||||
assertEquals("This is another string.", fService.getAttribute("string").getStringValue());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -294,6 +296,16 @@ public class AttributeServiceTest extends TestCase
|
||||
Attribute found = fService.getAttribute("dummy");
|
||||
assertNotNull(found);
|
||||
assertEquals(5, found.size());
|
||||
Attribute add = new IntAttributeValue(6);
|
||||
fService.addAttribute("dummy", add);
|
||||
assertEquals(6, fService.getAttribute("dummy").size());
|
||||
fService.removeAttribute("dummy", 2);
|
||||
found = fService.getAttribute("dummy");
|
||||
assertEquals(5, found.size());
|
||||
assertEquals(3, found.get(2).getIntValue());
|
||||
Attribute replace = new StringAttributeValue("String");
|
||||
fService.setAttribute("dummy", 2, replace);
|
||||
assertEquals("String", fService.getAttribute("dummy/2").getStringValue());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user