Package org.apache.sling.replication.queue.impl.simple

Examples of org.apache.sling.replication.queue.impl.simple.SimpleReplicationQueue


        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
        when(packageExporter.exportPackages(any(ResourceResolver.class), any(ReplicationRequest.class)))
                .thenReturn(Arrays.asList(replicationPackage));
        when(queueProvider.getDefaultQueue(name)).thenReturn(
                new SimpleReplicationQueue(name, "name"));
        ReplicationResponse response = agent.execute(resourceResolver, request);
        assertNotNull(response);
        assertEquals("ERROR", response.getStatus());
    }
View Full Code Here


        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
        when(distributionHandler.add(any(String.class), any(ReplicationPackage.class), eq(queueProvider))).thenReturn(true);
        when(packageExporter.exportPackages(any(ResourceResolver.class), any(ReplicationRequest.class)))
                .thenReturn(Arrays.asList(replicationPackage));
        when(queueProvider.getDefaultQueue(name)).thenReturn(
                new SimpleReplicationQueue(name, "name"));
        ReplicationResponse response = agent.execute(resourceResolver, request);
        assertNotNull(response);
        assertEquals("QUEUED", response.getStatus());
    }
View Full Code Here

        ResourceResolver resourceResolver = mock(ResourceResolver.class);

        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
        when(packageExporter.exportPackages(resourceResolver, request)).thenReturn(Arrays.asList(replicationPackage));
        when(queueProvider.getDefaultQueue(name)).thenReturn(
                new SimpleReplicationQueue(name, "name"));

        agent.execute(resourceResolver, request);
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.replication.queue.impl.simple.SimpleReplicationQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.