Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.Person


     * Test the profile properties.
     */
    @Test
    public void testProfileProperties()
    {
        Person ford = jpaPersonMapper.findByAccountId("fordp");

        assertEquals(1, ford.getBackground().getBackgroundItems(BackgroundItemType.INTEREST).size());
        assertEquals("Earthlings", ford.getBackground().getBackgroundItems(BackgroundItemType.INTEREST).get(0)
                .getName());
    }
View Full Code Here


        // wire up the updater
        DummyUpdater dummyUpdater = new DummyUpdater();
        Person.setEntityCacheUpdater(dummyUpdater);

        // find a person to update
        Person ford = jpaPersonMapper.findByAccountId("fordp");
        ford.setAvatarId("FOOBAR");

        // make sure the event hasn't fired yet
        assertNull(dummyUpdater.getUpdatedPerson());

        getEntityManager().flush();
View Full Code Here

        final long id = 4231L;

        TabGroup tg = jpaTabGroupMapper.findById(id);

        Person p = new Person("ndtyson", "Neil", "d", "deGrasse Tyson", "Dr. To You");
        p.setWorkPhone("1234567890");
        p.setTitle("Better than you!");
        p.setEmail("foo.blah@example.com");
        p.setJobDescription("some description!");
        p.setStartTabGroup(tg);

        // make sure nothing's happened yet
        assertNull(dummyUpdater.getPersistedPerson());
        jpaPersonMapper.insert(p);
View Full Code Here

     *             not expected
     */
    @Test
    public final void testPersist() throws Exception
    {
        final Person testPerson = context.mock(Person.class);
        final StreamScope streamScope = context.mock(StreamScope.class);

        context.checking(new Expectations()
        {
            {
View Full Code Here

                oneOf(ppr).getTheme();
                will(returnValue(null));
            }
        });

        final Person testPerson = sut.get(null, inFields);

        sut.persist(null, null, testPerson);
        Person testResult = personMapper.findByAccountId("nflanders");
        assertTrue(personMapper.isFollowing(testResult.getAccountId(), testResult.getAccountId()));

    }
View Full Code Here

     */
    @Before
    public void setup()
    {

        background = new Background(new Person());


        background.setBackgroundItems(parseItems("a,b,c", BackgroundItemType.AFFILIATION),
                BackgroundItemType.AFFILIATION);
        background.setBackgroundItems(parseItems("d,e,f", BackgroundItemType.HONOR),
View Full Code Here

       
        String json = sut.convertBackgroundToJSON(background).toString();
       
        StringRepresentation jsonRep = new StringRepresentation(json);
       
        final Background bg = new Background(new Person());
        bg.setBackgroundItems(new ArrayList<BackgroundItem>(), BackgroundItemType.AFFILIATION);
        bg.setBackgroundItems(new ArrayList<BackgroundItem>(), BackgroundItemType.HONOR);
        bg.setBackgroundItems(new ArrayList<BackgroundItem>(), BackgroundItemType.INTEREST);
        bg.setBackgroundItems(new ArrayList<BackgroundItem>(), BackgroundItemType.SKILL);
View Full Code Here

    public final void testLookup() throws NamingException
    {
        final List<Person> primaryList = new ArrayList<Person>();
        final List<Person> secondaryList = new ArrayList<Person>();

        primaryList.add(new Person("lastf", "Primary", "M", "Last", "F"));
        primaryList.add(new Person("other", "other", "M", "Last", "F"));

        secondaryList.add(new Person("lastf", "Secondar", "M", "Last", "F"));

        context.checking(new Expectations()
        {
            {
                oneOf(primaryMock).findPeople("searchString", 0);
View Full Code Here

     * Test the get method.
     */
    @Test
    public final void testGet()
    {
        final Person testPerson = context.mock(Person.class);

        userActionRequests = new ArrayList<UserActionRequest>();

        context.checking(new Expectations()
        {
View Full Code Here

     *             not expected
     */
    @Test
    public final void testPersistWithSameDisplayName() throws Exception
    {
        final Person testPerson = new Person("accountid", "First", "Middle", "Last", "Preferred");

        final List<Person> attribMembers = new ArrayList<Person>();
        attribMembers.add(new Person("id", "Homer", "Jay", "Simpson", "Homey"));
        attribMembers.add(new Person("id", "Max", "X", "Power", "Homer"));

        final List<Person> groupMembers = new ArrayList<Person>();
        groupMembers.add(new Person("id", "Homer", "Jay", "Simpson", "Homey"));
        groupMembers.add(new Person("id", "Max", "X", "Power", "Homer"));

        final long id = 1L;
        String newName = "NEW org name here";

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.Person

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.