Package org.apache.shindig.social.opensocial.spi

Examples of org.apache.shindig.social.opensocial.spi.GroupId


    List<Person> people = Lists.newArrayList(person);
    RestfulCollection<Person> data = new RestfulCollection<Person>(people);
    // TODO: We aren't passing john.doe to the service yet.
    expect(personService.getPeople(
        eq(ImmutableSet.of(new UserId(UserId.Type.userId, "jane.doe"))),
        eq(new GroupId(GroupId.Type.self, null)), eq(DEFAULT_OPTIONS),
        eq(DEFAULT_FIELDS), eq(token)))
        .andReturn(ImmediateFuture.newInstance(data));

    replay();
    assertEquals(person, operation.execute(Maps.<String, String[]>newHashMap(),
View Full Code Here


    List<Person> people = ImmutableList.of();
    RestfulCollection<Person> data = new RestfulCollection<Person>(people);
    Set<UserId> userIdSet = Sets.newLinkedHashSet(JOHN_DOE);
    userIdSet.add(new UserId(UserId.Type.userId, "jane.doe"));
    expect(personService.getPeople(eq(userIdSet),
        eq(new GroupId(GroupId.Type.self, null)),
        eq(DEFAULT_OPTIONS),
        eq(DEFAULT_FIELDS),
        eq(token))).andReturn(ImmediateFuture.newInstance(data));

    replay();
View Full Code Here

        String self = ID_1;
        expect(token.getViewerId()).andReturn(self);
        replay(token);

        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);

        expect(repository.findByUsername(self)).andReturn(getDbPerson());
        replay(repository);

        Future<RestfulCollection<Person>> people = service.getPeople(ids, groupId, null, null, token);
View Full Code Here

    }

    @Test
    public void getPeople_all() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.all, GROUP_ID);
        replay(token);

        expect(repository.findAllConnectedPeople(ID_2)).andReturn(getDbPersonList());
        expect(repository.findAllConnectedPeople(ID_3)).andReturn(getDbPersonList());
        replay(repository);
View Full Code Here

    }

    @Test
    public void getPeople_friends() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.friends, GROUP_ID);
        replay(token);

        expect(repository.findFriends(ID_2)).andReturn(getDbPersonList());
        expect(repository.findFriends(ID_3)).andReturn(getDbPersonList());
        replay(repository);
View Full Code Here

    }

    @Test
    public void getPeople_groupId() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);

        expect(repository.findByGroup(GROUP_ID)).andReturn(getDbPersonList());
        replay(repository);

        Future<RestfulCollection<Person>> people = service.getPeople(ids, groupId, null, null, token);
View Full Code Here

    }

    @Test
    public void getPeople_GroupFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.groupId, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = Person.Field.ABOUT_ME.toString();
        String value = "AAA";
View Full Code Here

    }

    @Test
    public void getPeople_AllFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.all, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = Person.Field.ABOUT_ME.toString();
        String value = "AAA";
View Full Code Here

    }

    @Test
    public void getPeople_FriendsFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.friends, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = Person.Field.ABOUT_ME.toString();
        String value = "AAA";
View Full Code Here

    }

    @Test
    public void getPeople_FriendsAllFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.friends, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = PersonService.ALL_FILTER;
        String value = "AAA";
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.opensocial.spi.GroupId

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.