Package org.eurekastreams.server.persistence.mappers.requests

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


                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

                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

        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

        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

        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

        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

        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

        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

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

        return new UpdatePersonResponse(dbPerson.getId(), wasPersonUpdated, wasPersonDisplayNameUpdated);
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.UpdatePersonResponse

Copyright © 2018 www.massapicom. 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.