use of com.adobe.acs.commons.mcp.impl.ProcessInstanceImpl in project acs-aem-commons by Adobe-Consulting-Services.
the class PageRelocatorTest method barebonesRun.
@Test
public void barebonesRun() throws LoginException, DeserializeException, RepositoryException, PersistenceException {
ResourceResolver rr = getEnhancedMockResolver(true);
ProcessInstance instance = new ProcessInstanceImpl(getControlledProcessManager(), tool, "relocator test");
assertEquals("Page Relocator: relocator test", instance.getName());
initInstance(instance, rr);
assertEquals(0.0, instance.updateProgress(), 0.00001);
instance.run(rr);
assertEquals(1.0, instance.updateProgress(), 0.00001);
verify(rr, atLeast(3)).commit();
}
use of com.adobe.acs.commons.mcp.impl.ProcessInstanceImpl in project acs-aem-commons by Adobe-Consulting-Services.
the class PageRelocatorTest method validateMoveOperation.
@Test
public void validateMoveOperation() throws RepositoryException, LoginException, DeserializeException, PersistenceException {
ResourceResolver rr = getEnhancedMockResolver(true);
ProcessInstance instance = new ProcessInstanceImpl(getControlledProcessManager(), tool, "relocator test");
initInstance(instance, rr);
ActionManager manager = getActionManager();
tool.movePages(manager);
assertTrue("Should be no reported errors", manager.getErrorCount() == 0);
assertFalse("Should have captured activate requests", tool.replicatorQueue.activateOperations.isEmpty());
assertFalse("Should have captured deactivate requests", tool.replicatorQueue.deactivateOperations.isEmpty());
// Our mock doesn't pretend to create target pages at the moment...
// Resource pageB = rr.getResource("/content/pageB");
// verify(rr, times(1)).create(eq(pageB), eq("pageA"), any());
verify(rr, atLeastOnce()).commit();
}
Aggregations