Unit tests for Alfresco aspect setting CMIS extensions

- Pioneered hybrid Surf/Chemistry approach to unit testing REST calls in the build
- Corrections to javascript library and Abdera extension
- Checking in source for Spring Surf Webscript test classes, generated with "mvn source:test-jar"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19433 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-03-20 15:52:04 +00:00
parent 3bba1e7432
commit cdb58a0d36
6 changed files with 312 additions and 9 deletions

View File

@@ -82,11 +82,12 @@ public class SetAspectsExtension extends ExtensibleElementWrapper
public Set<String> getAspectsToAdd()
{
Set<String> aspects = new TreeSet<String>();
for (Element aspect = getFirstChild(ASPECTS_TO_ADD); aspect != null; aspect = aspect
.getNextSibling(ASPECTS_TO_ADD))
for (Element aspect : this)
{
aspects.add(aspect.getText());
if (aspect.getQName().equals(ASPECTS_TO_ADD))
{
aspects.add(aspect.getText());
}
}
return aspects;
}
@@ -99,11 +100,12 @@ public class SetAspectsExtension extends ExtensibleElementWrapper
public Set<String> getAspectsToRemove()
{
Set<String> aspects = new TreeSet<String>();
for (Element aspect = getFirstChild(ASPECTS_TO_REMOVE); aspect != null; aspect = aspect
.getNextSibling(ASPECTS_TO_REMOVE))
for (Element aspect : this)
{
aspects.add(aspect.getText());
if (aspect.getQName().equals(ASPECTS_TO_REMOVE))
{
aspects.add(aspect.getText());
}
}
return aspects;
}