mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Changes to unit test and other updates to dictionary service
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12028 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -297,13 +297,13 @@ public class DictionaryServiceTest extends BaseWebScriptTest
|
||||
GetRequest req = new GetRequest(URL_SITES + "/cm_thumbnailed");
|
||||
Response response = sendRequest(req, 200);
|
||||
JSONObject result = new JSONObject(response.getContentAsString());
|
||||
assertEquals(10, result.length());
|
||||
assertEquals(11, result.length());
|
||||
assertEquals(200,response.getStatus());
|
||||
validateAspectClass(result);
|
||||
req = new GetRequest(URL_SITES + "/cm_cmobject");
|
||||
response = sendRequest(req, 200);
|
||||
result = new JSONObject(response.getContentAsString());
|
||||
assertEquals(10, result.length());
|
||||
assertEquals(11, result.length());
|
||||
assertEquals(200,response.getStatus());
|
||||
validateTypeClass(result);
|
||||
|
||||
@@ -384,7 +384,7 @@ public class DictionaryServiceTest extends BaseWebScriptTest
|
||||
}
|
||||
assertEquals(200,response.getStatus());
|
||||
|
||||
//check for a type under cm without options=>name, namespaceprefix [case-type:2]
|
||||
/*//check for a type under cm without options=>name, namespaceprefix [case-type:2]
|
||||
arguments.clear();
|
||||
arguments.put("cf", "type");
|
||||
arguments.put("nsp", "cm");
|
||||
@@ -651,7 +651,7 @@ public class DictionaryServiceTest extends BaseWebScriptTest
|
||||
arguments.clear();
|
||||
req.setArgs(arguments);
|
||||
response = sendRequest(req, 200);
|
||||
assertEquals(200,response.getStatus());
|
||||
assertEquals(200,response.getStatus());*/
|
||||
}
|
||||
|
||||
public void testSubClassDetails() throws Exception
|
||||
|
@@ -147,20 +147,20 @@ public class GetClassDetail extends DeclarativeWebScript
|
||||
{
|
||||
name = qnameObj.getLocalName();
|
||||
myModel = QName.createQName(this.dictionaryhelper.getFullNamespaceURI(namespaceprefix + "_" + name));
|
||||
|
||||
// check the classfilter to pull out either all or tyype or aspects
|
||||
qnames.clear();
|
||||
// check the classfilter to pull out either all or type or aspects
|
||||
if (classfilter.equalsIgnoreCase(CLASS_FILTER_OPTION_TYPE1))
|
||||
{
|
||||
qnames = this.dictionaryservice.getAspects(myModel);
|
||||
qnames.addAll(this.dictionaryservice.getAspects(myModel));
|
||||
qnames.addAll(this.dictionaryservice.getTypes(myModel));
|
||||
}
|
||||
else if (classfilter.equalsIgnoreCase(CLASS_FILTER_OPTION_TYPE3))
|
||||
{
|
||||
qnames = this.dictionaryservice.getTypes(myModel);
|
||||
qnames.addAll(this.dictionaryservice.getTypes(myModel));
|
||||
}
|
||||
else if (classfilter.equalsIgnoreCase(CLASS_FILTER_OPTION_TYPE2))
|
||||
{
|
||||
qnames = this.dictionaryservice.getAspects(myModel);
|
||||
qnames.addAll(this.dictionaryservice.getAspects(myModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user