Search in sources :

Example 1 with DownloadDefaultBinaryValueServlet

use of org.apache.sling.jcr.js.nodetypes.downloaddefaultbinary.DownloadDefaultBinaryValueServlet in project sling by apache.

the class DownloadDefaultBinaryValueTest method invokeServletWithEqualPropertyDefs.

private void invokeServletWithEqualPropertyDefs() throws NoSuchNodeTypeException, RepositoryException, ValueFormatException, ServletException, IOException {
    NodeType nodeType = mock(NodeType.class);
    when(ntManager.getNodeType("ns:ntName")).thenReturn(nodeType);
    PropertyDefinition[] propDefs = propDefGenerator.getEqualPropertyDefinitions();
    when(nodeType.getPropertyDefinitions()).thenReturn(propDefs);
    DownloadDefaultBinaryValueServlet downloadServlet = new DownloadDefaultBinaryValueServlet();
    downloadServlet.service(request, response);
}
Also used : DownloadDefaultBinaryValueServlet(org.apache.sling.jcr.js.nodetypes.downloaddefaultbinary.DownloadDefaultBinaryValueServlet) NodeType(javax.jcr.nodetype.NodeType) PropertyDefinition(javax.jcr.nodetype.PropertyDefinition)

Example 2 with DownloadDefaultBinaryValueServlet

use of org.apache.sling.jcr.js.nodetypes.downloaddefaultbinary.DownloadDefaultBinaryValueServlet in project sling by apache.

the class DownloadDefaultBinaryValueTest method invokeServletWithDifferentPropertyDefs.

private void invokeServletWithDifferentPropertyDefs() throws NoSuchNodeTypeException, RepositoryException, ValueFormatException, ServletException, IOException {
    NodeType nodeType = mock(NodeType.class);
    when(ntManager.getNodeType("ns:ntName")).thenReturn(nodeType);
    PropertyDefinition[] propDefs = propDefGenerator.getDifferentPropertyDefinitions();
    when(nodeType.getPropertyDefinitions()).thenReturn(propDefs);
    DownloadDefaultBinaryValueServlet downloadServlet = new DownloadDefaultBinaryValueServlet();
    downloadServlet.service(request, response);
}
Also used : DownloadDefaultBinaryValueServlet(org.apache.sling.jcr.js.nodetypes.downloaddefaultbinary.DownloadDefaultBinaryValueServlet) NodeType(javax.jcr.nodetype.NodeType) PropertyDefinition(javax.jcr.nodetype.PropertyDefinition)

Aggregations

NodeType (javax.jcr.nodetype.NodeType)2 PropertyDefinition (javax.jcr.nodetype.PropertyDefinition)2 DownloadDefaultBinaryValueServlet (org.apache.sling.jcr.js.nodetypes.downloaddefaultbinary.DownloadDefaultBinaryValueServlet)2