Examples of FieldRestrictingPerson


Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(p.getBirthday(), is(equalTo(BIRTHDAY)));
    }

    @Test
    public void getBirthday_notset() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.AGE, Person.Field.ACTIVITIES));
        assertThat(p.getBirthday(), is(nullValue()));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

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

    @Test
    public void getActvities_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.ACTIVITIES));
        List<String> activities = p.getActivities();
        assertThat(activities.size(), is(equalTo(2)));
        assertThat(activities.contains(ACTIVITY_1), is(true));
        assertThat(activities.contains(ACTIVITY_2), is(true));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(activities.contains(ACTIVITY_2), is(true));
    }

    @Test
    public void getActivities_notset() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.AGE, Person.Field.BOOKS));
        assertThat(p.getActivities(), is(nullValue()));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.AGE, Person.Field.BOOKS));
        assertThat(p.getActivities(), is(nullValue()));
    }
    @Test
    public void getBooks_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.BOOKS, Person.Field.ACTIVITIES));
        assertThat(p.getBooks().isEmpty(), is(true));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(p.getBooks().isEmpty(), is(true));
    }

    @Test
    public void getCars_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.CARS, Person.Field.ACTIVITIES));
        assertThat(p.getCars().isEmpty(), is(true));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(p.getCars().isEmpty(), is(true));
    }

    @Test
    public void getBodyType_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.BODY_TYPE));
        assertThat(p.getBodyType().getBuild(), is(equalTo(BODY_BUILD)));
        assertThat(p.getBodyType().getEyeColor(), is(equalTo(BODY_EYE_COLOR)));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(p.getBodyType().getEyeColor(), is(equalTo(BODY_EYE_COLOR)));
    }

    @Test
    public void getBodyType_notset() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.AGE, Person.Field.ACTIVITIES));
        assertThat(p.getBodyType(), is(nullValue()));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

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

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

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

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

    @Test
    public void getDrinker_set() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.DRINKER));
        assertThat(p.getDrinker().getValue(), is(equalTo(Drinker.HEAVILY)));
    }
View Full Code Here

Examples of org.apache.rave.opensocial.service.impl.FieldRestrictingPerson

        assertThat(p.getDrinker().getValue(), is(equalTo(Drinker.HEAVILY)));
    }

    @Test
    public void getDrinker_notset() {
        Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.ABOUT_ME));
        assertThat(p.getDrinker(), is(nullValue()));
    }
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.