use of org.alfresco.repo.rendition.RenditionDefinitionImpl in project alfresco-repository by Alfresco.
the class AbstractRenderingEngineTest method makeRenditionDefinition.
/**
* Set up the rendition definition.
* @param renditionAssoc ChildAssociationRef
* @return RenditionDefinition
*/
private RenditionDefinition makeRenditionDefinition(ChildAssociationRef renditionAssoc) {
String id = "definitionId";
RenditionDefinition definition = new RenditionDefinitionImpl(id, renditionAssoc.getQName(), TestRenderingEngine.NAME);
definition.setRenditionAssociationType(renditionAssoc.getTypeQName());
definition.setRenditionParent(source);
return definition;
}
use of org.alfresco.repo.rendition.RenditionDefinitionImpl in project alfresco-repository by Alfresco.
the class AbstractRenderingEngineTest method testCheckSourceNodeExists.
public void testCheckSourceNodeExists() {
when(nodeService.exists(any(NodeRef.class))).thenReturn(false);
RenditionDefinitionImpl definition = new RenditionDefinitionImpl("id", null, TestRenderingEngine.NAME);
try {
engine.executeImpl(definition, source);
fail("Should have thrown an exception here!");
} catch (RenditionServiceException e) {
assertTrue(e.getMessage().endsWith("Cannot execute action as node does not exist: http://test/sourceId"));
}
}
Aggregations