Search in sources :

Example 1 with DeserializeException

use of com.adobe.acs.commons.mcp.util.DeserializeException in project acs-aem-commons by Adobe-Consulting-Services.

the class FolderRelocatorTest method testRequiredFields.

@Test
public void testRequiredFields() throws LoginException, DeserializeException, RepositoryException {
    ResourceResolver rr = getEnhancedMockResolver();
    FolderRelocator tool = new FolderRelocatorFactory().createProcessDefinition();
    ProcessInstance instance = new ProcessInstanceImpl(getControlledProcessManager(), tool, "relocator test");
    assertEquals("Folder Relocator: relocator test", instance.getName());
    try {
        instance.init(rr, Collections.EMPTY_MAP);
        fail("That should have thrown an error");
    } catch (DeserializeException ex) {
    // Expected
    }
}
Also used : ProcessInstanceImpl(com.adobe.acs.commons.mcp.impl.ProcessInstanceImpl) ResourceResolver(org.apache.sling.api.resource.ResourceResolver) ProcessInstance(com.adobe.acs.commons.mcp.ProcessInstance) DeserializeException(com.adobe.acs.commons.mcp.util.DeserializeException) Test(org.junit.Test) ActionManagerTest(com.adobe.acs.commons.fam.impl.ActionManagerTest)

Aggregations

ActionManagerTest (com.adobe.acs.commons.fam.impl.ActionManagerTest)1 ProcessInstance (com.adobe.acs.commons.mcp.ProcessInstance)1 ProcessInstanceImpl (com.adobe.acs.commons.mcp.impl.ProcessInstanceImpl)1 DeserializeException (com.adobe.acs.commons.mcp.util.DeserializeException)1 ResourceResolver (org.apache.sling.api.resource.ResourceResolver)1 Test (org.junit.Test)1