Package org.apache.syncope.common.mod

Examples of org.apache.syncope.common.mod.UserMod.addResourceToBeAdded()


        assertNotNull(userTO);

        // 2. assign resource without specifying a new pwd and check propagation failure
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.addResourceToBeAdded(RESOURCE_NAME_TESTDB);
        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
        assertFalse(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());
        assertNotNull(userTO.getPropagationStatusTOs().get(0).getFailureReason());
View Full Code Here


        assertNotNull(userTO);

        // 2. update user, assign a propagation primary resource but don't provide any password
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.addResourceToBeAdded(RESOURCE_NAME_LDAP);

        userTO = userService.update(userMod.getId(), userMod);
        assertNotNull(userTO);

        // 3. verify that propagation was successful
View Full Code Here

        //2. update assigning a resource NOT forcing mandatory constraints
        // AND primary: must fail with PropagationException
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword("newPassword");
        userMod.addResourceToBeAdded(RESOURCE_NAME_WS1);
        userMod.addResourceToBeAdded(RESOURCE_NAME_TESTDB);
        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_WS1, userTO.getPropagationStatusTOs().get(1).getResource());
        assertNotNull(userTO.getPropagationStatusTOs().get(1).getFailureReason());
        assertEquals(PropagationTaskExecStatus.UNSUBMITTED, userTO.getPropagationStatusTOs().get(1).getStatus());
View Full Code Here

        // AND primary: must fail with PropagationException
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword("newPassword");
        userMod.addResourceToBeAdded(RESOURCE_NAME_WS1);
        userMod.addResourceToBeAdded(RESOURCE_NAME_TESTDB);
        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_WS1, userTO.getPropagationStatusTOs().get(1).getResource());
        assertNotNull(userTO.getPropagationStatusTOs().get(1).getFailureReason());
        assertEquals(PropagationTaskExecStatus.UNSUBMITTED, userTO.getPropagationStatusTOs().get(1).getStatus());
    }
View Full Code Here

        assertNotNull(userTO);

        // 2. assign resource without specifying a new pwd and check propagation failure
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.addResourceToBeAdded(RESOURCE_NAME_TESTDB);
        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
        assertFalse(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());

        // 3. request to change password only on testdb
View Full Code Here

        UserTO toBeUpdated = userService.read(created.getId());
        UserMod userMod = new UserMod();
        userMod.setId(toBeUpdated.getId());
        userMod.setPassword("password2");
        // assign new resource to user
        userMod.addResourceToBeAdded("ws-target-resource-2");
        //modify virtual attribute
        userMod.addVirtualAttributeToBeRemoved("virtualdata");
        userMod.addVirtualAttributeToBeUpdated(attributeMod("virtualdata", "test@testoneone.com"));
        // check Syncope change password
View Full Code Here

        UserTO toBeUpdated = userService.read(created.getId());
        UserMod userMod = new UserMod();
        userMod.setId(toBeUpdated.getId());
        userMod.setPassword("password2");
        // assign new resource to user
        userMod.addResourceToBeAdded(RESOURCE_NAME_WS2);
        //modify virtual attribute
        userMod.addVirtualAttributeToBeRemoved("virtualdata");
        userMod.addVirtualAttributeToBeUpdated(attributeMod("virtualdata", "test@testoneone.com"));

        // check Syncope change password
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.