Examples of UpdatePersonResponse


Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

                allowing(actionContext).getParams();
                will(returnValue(ldapPerson));

                oneOf(updatePersonMapper).execute(with(ldapPerson));
                will(returnValue(new UpdatePersonResponse(1L, true, false)));

                allowing(ldapPerson).getAccountId();
                will(returnValue("foo"));

                oneOf(taskHandlerActionContext).getUserActionRequests();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

                allowing(actionContext).getParams();
                will(returnValue(ldapPerson));

                oneOf(updatePersonMapper).execute(with(ldapPerson));
                will(returnValue(new UpdatePersonResponse(1L, true, true)));

                allowing(taskHandlerActionContext).getUserActionRequests();
                will(returnValue(requests));

                allowing(ldapPerson).getAccountId();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

                allowing(ldapPerson).getAccountId();
                will(returnValue("foo"));

                oneOf(updatePersonMapper).execute(with(ldapPerson));
                will(returnValue(new UpdatePersonResponse(1L, false, false)));
            }
        });

        sut.execute(taskHandlerActionContext);
        context.assertIsSatisfied();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        Person p = new Person("fordp", "Ford", "X", "Prefect", "Volgon-Swatter");
        assertTrue(p.getDisplayNameSuffix().equals(""));
        p.setAdditionalProperties(additional);
       
        UpdatePersonResponse response = sut.execute(p);       
        assertFalse(response.wasUserUpdated());
        assertFalse(response.wasDisplayNameUpdated());
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        assertTrue(dbPerson.getAdditionalProperties() != null);

        Person p = new Person("fordp", "Ford", "X", "Prefect", "Volgon-Swatter");

        UpdatePersonResponse response = sut.execute(p);

        assertTrue(response.wasUserUpdated());
        assertFalse(response.wasDisplayNameUpdated());
        assertTrue(dbPerson.getAdditionalProperties() == null);
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        assertTrue(dbPerson.getLastName().equals("Prefect"));

        Person p = new Person("fordp", "Ford", "X", newLastName, "Volgon-Swatter");

        UpdatePersonResponse response = sut.execute(p);
        assertTrue(response.wasUserUpdated());
        assertTrue(response.wasDisplayNameUpdated());

        getEntityManager().flush();
        getEntityManager().clear();

        Person resultPerson = (Person) getEntityManager().createQuery("FROM Person WHERE id = :id")
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        assertTrue(dbPerson.getDisplayNameSuffix().equals(""));

        Person p = new Person("fordp", "Ford", "X", newLastName, "Volgon-Swatter");
        p.setDisplayNameSuffix(" FOO");

        UpdatePersonResponse response = sut.execute(p);
        assertTrue(response.wasUserUpdated());
        assertTrue(response.wasDisplayNameUpdated());

        getEntityManager().flush();
        getEntityManager().clear();

        Person resultPerson = (Person) getEntityManager().createQuery("FROM Person WHERE id = :id")
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        ldapProps.put("key5", "value5A");
        ldapProps.put("key7", "value7");
        ldapPerson.setAdditionalProperties(ldapProps);

        // execute
        UpdatePersonResponse result = sut.execute(ldapPerson);

        // verify
        assertTrue(result.wasUserUpdated());
        getEntityManager().flush();
        getEntityManager().clear();
        Person resultPerson = (Person) getEntityManager().createQuery("FROM Person WHERE id = :id")
                .setParameter("id", PERSON_ID).getSingleResult();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        HashMap<String, String> ldapProps = new HashMap<String, String>();
        ldapProps.put("key1", "value1");
        ldapPerson.setAdditionalProperties(ldapProps);

        // execute
        UpdatePersonResponse result = sut.execute(ldapPerson);

        // verify
        assertTrue(result.wasUserUpdated());
        getEntityManager().flush();
        getEntityManager().clear();
        Person resultPerson = (Person) getEntityManager().createQuery("FROM Person WHERE id = :id")
                .setParameter("id", PERSON_ID).getSingleResult();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

        if (wasPersonUpdated)
        {
            getEntityManager().flush();
        }

        return new UpdatePersonResponse(dbPerson.getId(), wasPersonUpdated, wasPersonDisplayNameUpdated);
    }
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.