Examples of UserId


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

        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }

    private void testDeletePersonDataNoAppDataExpected(ApplicationData applicationData) throws InterruptedException, ExecutionException {

        UserId userId = new UserId(UserId.Type.userId, VALID_USER_ID);
        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
View Full Code Here

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

    private void testUpdatePersonData(Set<String> fields, Map<String, String> values,
                                      HashMap<String, String> expectedApplicationDataAfterUpdate,
                                      ApplicationData applicationData) {

        UserId userId = new UserId(UserId.Type.userId, VALID_USER_ID);
        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
View Full Code Here

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

        service = new DefaultPersonService(repository);
    }

    @Test
    public void getPerson_allFields() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);
        Set<String> fields = new HashSet<String>();

        org.apache.rave.model.Person dbPerson = getDbPerson(ID_1);
        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);
View Full Code Here

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

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

    @Test
    public void getPerson_restrictedFields() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);
        Set<String> fields = new HashSet<String>();
        fields.add(Person.Field.DISPLAY_NAME.toString());
        fields.add(Person.Field.ID.toString());

        org.apache.rave.model.Person dbPerson = getDbPerson();
View Full Code Here

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

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

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

        org.apache.rave.model.Person dbPerson = getDbPerson(ID_1);
        expect(repository.findByUsername(ID_1)).andReturn(dbPerson);
        replay(repository);
View Full Code Here

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

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

    @Test
    public void getPerson_viewer() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.viewer, ID_2);

        expect(token.getViewerId()).andReturn(ID_1);
        replay(token);

        org.apache.rave.model.Person dbPerson = getDbPerson(ID_1);
View Full Code Here

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

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

    @Test(expected = ProtocolException.class)
    public void getPerson_nullValue() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_2);

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

        service.getPerson(id, null, token);
View Full Code Here

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

        return Lists.asList(getDbPerson(), new org.apache.rave.model.Person[]{});
    }

    private Set<UserId> getUserIdSet() {
        Set<UserId> ids = new HashSet<UserId>();
        ids.add(new UserId(UserId.Type.userId, ID_2));
        ids.add(new UserId(UserId.Type.userId, ID_3));
        return ids;
    }
View Full Code Here

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

    }

    @Test
    public void createActivityEntryTest() 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(token.getViewerId()).andReturn(ID_1);
        expect(repository.save(EasyMock.isA(ActivityStreamsEntryImpl.class))).andReturn(activityStreamsEntry);
View Full Code Here

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

    }

    @Test
    public void getActivityEntriesTest() throws ExecutionException, InterruptedException {

        UserId id = new UserId(UserId.Type.userId, ID_1);
        UserId id2 = new UserId(UserId.Type.userId, ID_2);
        Set<UserId> users = new HashSet<UserId>();
        users.add(id);
        users.add(id2);

        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
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.