use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ExtensionDataImpl in project alfresco-repository by Alfresco.
the class CMISTest method testGetRepositoryInfos.
/**
* ALF-20389 Test Alfresco cmis stream interceptor that checks content stream for mimetype. Only ContentStreamImpl extensions should take palace.
*/
@Test
public void testGetRepositoryInfos() {
boolean cmisEx = false;
List<RepositoryInfo> infoDataList = null;
try {
infoDataList = withCmisService(new CmisServiceCallback<List<RepositoryInfo>>() {
@Override
public List<RepositoryInfo> execute(CmisService cmisService) {
ExtensionDataImpl result = new ExtensionDataImpl();
List<CmisExtensionElement> extensions = new ArrayList<CmisExtensionElement>();
result.setExtensions(extensions);
return cmisService.getRepositoryInfos(result);
}
});
} catch (CmisRuntimeException e) {
cmisEx = true;
}
assertNotNull(cmisEx ? "CmisRuntimeException was thrown. Please, take a look on ALF-20389" : "No CMIS repository information was retrieved", infoDataList);
}
Aggregations