Interim checkin for ListAttribute support.

Should fix build breakage also.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5551 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-04-25 18:35:26 +00:00
parent 162ba3e141
commit 602440a983
24 changed files with 1156 additions and 10 deletions

View File

@@ -103,7 +103,8 @@ public class AttributeServiceTest extends TestCase
assertNotNull(fService.getAttribute("boolean"));
assertEquals(42, (int)fService.getAttribute("short").getShortValue());
assertEquals("I sneeze.", fService.getAttribute("map/funky").getStringValue());
assertEquals(10, fService.getKeys("").size());
// This is 11 because of the AVMLockingService.
assertEquals(11, fService.getKeys("").size());
assertEquals(5, fService.getKeys("map").size());
List<String> keys = fService.getKeys("");
for (String key : keys)
@@ -276,4 +277,28 @@ public class AttributeServiceTest extends TestCase
}
}
/**
* Test ListAttributes
*/
public void testList()
{
try
{
ListAttribute list = new ListAttributeValue();
list.add(new IntAttributeValue(0));
list.add(new IntAttributeValue(1));
list.add(new IntAttributeValue(2));
list.add(new IntAttributeValue(3));
list.add(new IntAttributeValue(4));
fService.setAttribute("", "dummy", list);
Attribute found = fService.getAttribute("dummy");
assertNotNull(found);
assertEquals(5, found.size());
}
catch (Exception e)
{
e.printStackTrace();
fail();
}
}
}