Search in sources :

Example 1 with PageManagerFactory

use of com.day.cq.wcm.api.PageManagerFactory in project acs-aem-commons by Adobe-Consulting-Services.

the class PageRelocatorTest method getPageRelocatorTool.

private PageRelocator getPageRelocatorTool() {
    PageManagerFactory mockPageManagerFactory = mock(PageManagerFactory.class);
    when(mockPageManagerFactory.getPageManager(any())).then(invocation -> new MockPageManager(getMockResolver()));
    slingContext.registerService(PageManagerFactory.class, mockPageManagerFactory);
    Replicator replicator = mock(Replicator.class);
    slingContext.registerService(Replicator.class, replicator);
    PageRelocatorFactory t = new PageRelocatorFactory();
    slingContext.registerInjectActivateService(t);
    return t.createProcessDefinition();
}
Also used : Replicator(com.day.cq.replication.Replicator) PageManagerFactory(com.day.cq.wcm.api.PageManagerFactory)

Aggregations

Replicator (com.day.cq.replication.Replicator)1 PageManagerFactory (com.day.cq.wcm.api.PageManagerFactory)1