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

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


        UserId id = new UserId(UserId.Type.userId, ID_1);
        UserId id2 = new UserId(UserId.Type.userId, ID_2);
        HashSet<UserId> users = new HashSet<UserId>();
        users.add(id);
        users.add(id2);
        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();

        expect(repository.save(EasyMock.isA(ActivityStreamsEntryImpl.class))).andReturn(activityStreamsEntry);
        expect(repository.get(ACTIVITY_ID)).andReturn(activityStreamsEntry);
        expect(personService.getPeople(users,groupId,null,fields,token)).andReturn(ImmediateFuture.newInstance(new RestfulCollection<Person>(getDbPersonList())));
View Full Code Here


    @Test
    public void getActivityEntryWithIdTest() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);

        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();


        expect(repository.save(EasyMock.isA(ActivityStreamsEntryImpl.class))).andReturn(activityStreamsEntry);
        expect(repository.get(EasyMock.eq(ACTIVITY_ID))).andReturn(activityStreamsEntry);
View Full Code Here

    @Test
    public void deleteActivityEntryWithIdTest() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);

        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();


        expect(repository.save(activityStreamsEntry)).andReturn(activityStreamsEntry);
        expect(repository.get(ACTIVITY_ID)).andReturn(activityStreamsEntry);
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.get(Long.parseLong(self))).andReturn(getDbPerson());
        replay(repository);

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

    @Test
    @Ignore
    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
    @Ignore
    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

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.