Package org.apache.sling.replication.packaging

Examples of org.apache.sling.replication.packaging.ReplicationPackage


        ComponentContext context = mock(ComponentContext.class);
        Dictionary properties = mock(Dictionary.class);
        when(properties.get("priority.paths")).thenReturn(new String[]{"/content", "/apps"});
        when(context.getProperties()).thenReturn(properties);
        priorityPathDistributionStrategy.activate(context);
        ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
        when(replicationPackage.getPaths()).thenReturn(new String[]{"/apps"});
        ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
        ReplicationQueue queue = mock(ReplicationQueue.class);

        when(queueProvider.getQueue("agentName", "/apps")).thenReturn(queue);
        when(queue.add(any(ReplicationQueueItem.class))).thenReturn(true);
View Full Code Here


    @Test
    public void testDeliverPackageWithoutSubHandlers() throws Exception {
        List<ReplicationTransportHandler> subHandlers = new ArrayList<ReplicationTransportHandler>();
        ResourceResolver resourceResolver = mock(ResourceResolver.class);
        ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
        for (TransportEndpointStrategyType strategy : TransportEndpointStrategyType.values()) {
            MultipleEndpointReplicationTransportHandler multipleEndpointReplicationTransportHandler = new MultipleEndpointReplicationTransportHandler(subHandlers, strategy);
            multipleEndpointReplicationTransportHandler.deliverPackage(resourceResolver, replicationPackage);
        }
    }
View Full Code Here

    public void testDeliverPackageWithSubHandlers() throws Exception {
        List<ReplicationTransportHandler> subHandlers = new ArrayList<ReplicationTransportHandler>();
        subHandlers.add(mock(ReplicationTransportHandler.class));
        subHandlers.add(mock(ReplicationTransportHandler.class));
        ResourceResolver resourceResolver = mock(ResourceResolver.class);
        ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
        for (TransportEndpointStrategyType strategy : TransportEndpointStrategyType.values()) {
            MultipleEndpointReplicationTransportHandler multipleEndpointReplicationTransportHandler = new MultipleEndpointReplicationTransportHandler(subHandlers, strategy);
            multipleEndpointReplicationTransportHandler.deliverPackage(resourceResolver, replicationPackage);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.replication.packaging.ReplicationPackage

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.