Package org.apache.shindig.social.opensocial.model

Examples of org.apache.shindig.social.opensocial.model.Person


        assertThat(p.getRelationshipStatus(), is(nullValue()));
    }

    @Test
    public void getStatus_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.STATUS));
        assertThat(p.getStatus(), is(equalTo(STATUS)));
    }
View Full Code Here


        assertThat(p.getStatus(), is(equalTo(STATUS)));
    }

    @Test
    public void getAddresses_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.ADDRESSES));
        assertThat(p.getAddresses().size(), is(equalTo(2)));
        assertThat(p.getAddresses().get(1).getStreetAddress(), is(equalTo(STREET)));
        assertThat(p.getAddresses().get(1).getLocality(), is(equalTo(CITY)));
        assertThat(p.getAddresses().get(1).getRegion(), is(equalTo(STATE)));
        assertThat(p.getAddresses().get(1).getCountry(), is(equalTo(COUNTRY)));
        assertThat(p.getAddresses().get(1).getLatitude(), is(equalTo(LATITUDE)));
        assertThat(p.getAddresses().get(1).getLongitude(), is(equalTo(LONGITUDE)));
        assertThat(p.getAddresses().get(1).getPostalCode(), is(equalTo(POSTAL_CODE)));
        assertThat(p.getAddresses().get(1).getType(), is(equalTo(QUALIFIER)));
    }
View Full Code Here

        assertThat(p.getAddresses().get(1).getType(), is(equalTo(QUALIFIER)));
    }

    @Test
    public void getCurrentLocation_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.CURRENT_LOCATION));
        assertThat(p.getCurrentLocation().getStreetAddress(), is(equalTo(STREET)));
    }
View Full Code Here

        assertThat(p.getCurrentLocation().getStreetAddress(), is(equalTo(STREET)));
    }

    @Test
    public void getCurrentLocation_notset() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.ADDRESSES));
        assertThat(p.getCurrentLocation(), is(nullValue()));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(notNullValue()));
        Person person = personFuture.get();
        assertThat(person, is(notNullValue()));
        assertThat(person.getTags().size(), is(1));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, fields, token);
        assertThat(personFuture, is(notNullValue()));
        Person person = personFuture.get();
        assertThat(person, is(notNullValue()));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(nullValue()));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(notNullValue()));
        Person person = personFuture.get();
        assertThat(personFuture, is(notNullValue()));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);

        Future<Person> personFuture = service.getPerson(id, null, token);
        assertThat(personFuture, is(notNullValue()));
        Person person = personFuture.get();
        assertThat(person, is(notNullValue()));
        assertThat(person, is(instanceOf(FieldRestrictingPerson.class)));
        assertThat(person.getId(), is(equalTo(ID_1)));
        assertThat(person.getHappiestWhen(), is(equalTo(HAPPIEST_WHEN)));
        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

    private static final String ID = "1";


    @Test
    public void getId() {
        Person p = new FieldRestrictingPerson(getTestPerson(), null);
        assertThat(p.getId(), is(equalTo(USERNAME)));
    }
View Full Code Here

        Person p = new FieldRestrictingPerson(getTestPerson(), null);
        assertThat(p.getId(), is(equalTo(USERNAME)));
    }
    @Test
    public void getDisplayName() {
        Person p = new FieldRestrictingPerson(getTestPerson(), null);
        assertThat(p.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.opensocial.model.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.