Examples of RestProfile


Examples of org.exoplatform.social.client.api.model.RestProfile

    }
    RestIdentity restIdentity = identityService.getIdentity("organization", "root");
    assertThat("RestIdentity must not null.", restIdentity, notNullValue());
    assertThat("RemoteId must be root", "root", equalTo(restIdentity.getRemoteId()));
    assertThat("Provider must be organization", "organization", equalTo(restIdentity.getProviderId()));
    RestProfile restProfile = restIdentity.getProfile();
    assertThat("Avatar URL must not be null", restProfile.getAvatarUrl(), notNullValue());
    assertThat("Profile's full name must be root gtn", "Root Root", equalTo(restProfile.getFullName()));
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

    RestIdentity identity = identityService.get(id);
    assertThat("Identity must not be null", identity, notNullValue());
    assertThat("Identity provider must be organization", identity.getProviderId(), equalTo("organization"));
    assertThat("RemoteId must be demo", identity.getRemoteId(), equalTo("root"));

    RestProfile profile = identity.getProfile();
    assertThat("profile must not be null", profile, notNullValue());
    assertThat("profile.getAvatarUrl() must not be null", profile.getAvatarUrl(), notNullValue());
    assertThat("profile.getFullName() must return: Root Root", profile.getFullName(), equalTo("Root Root"));

    try {
      identity = identityService.get(null);
      fail("Expecting NullPointerException from IdentityService#get(String)");
    } catch (NullPointerException npe) {
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

    }
    RestIdentity restIdentity = identityService.getIdentity("organization", "root");
    assertThat("RestIdentity must not null.", restIdentity, notNullValue());
    assertThat("RemoteId must be root", "root", equalTo(restIdentity.getRemoteId()));
    assertThat("Provider must be organization", "organization", equalTo(restIdentity.getProviderId()));
    RestProfile restProfile = restIdentity.getProfile();
    assertThat("Avatar URL must not be null", restProfile.getAvatarUrl(), notNullValue());
    assertThat("Profile's full name must be root gtn", "Root Root", equalTo(restProfile.getFullName()));
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

*/
public class IdentityImplTest {

  @Test
  public void shouldCreteInstanceAndGetFields() {
    RestProfile restProfile = new RestProfile();
    RestIdentity restIdentity = new RestIdentity("123", "organization", "demo", restProfile);
    assertThat("restIdentity.getId() must return 123", restIdentity.getId(), equalTo("123"));
    assertThat("restIdentity.getProviderId() must return organization",
               restIdentity.getProviderId(), equalTo("organization"));
    assertThat("restIdentity.getRemoteId() must return demo", restIdentity.getRemoteId(), equalTo("demo"));
    //gets default value
    assertThat("restIdentity.getProfile() must be null",
                restIdentity.getProfile(), equalTo((RestProfile)new RestProfile()));
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

*/
public class ProfileImplTest {

  @Test
  public void shouldGetDefaultValues() {
    RestProfile restProfile = new RestProfile();
    assertThat("restProfile.getIdentityId() must be null", restProfile.getIdentityId(), nullValue());
    assertThat("restProfile.getFullName() must be null", restProfile.getFullName(), nullValue());
    assertThat("restProfile.getAvatarUrl() must be null", restProfile.getAvatarUrl(), nullValue());
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

  @Test
  public void shouldGetSettedValues() {
    final String identityId = "123456789";
    final String fullName = "Demo Gtn";
    final String avatarUrl = "http://platform35.demo.exoplatform.org/restProfile/avatar/demo.jpg";
    RestProfile restProfile = new RestProfile(identityId, fullName, avatarUrl);

    assertThat("restProfile.getIdentityId() must return: " + identityId, restProfile.getIdentityId(), equalTo(identityId));
    assertThat("restProfile.getFullName() must return: " + fullName, restProfile.getFullName(), equalTo(fullName));
    assertThat("restProfile.getAvatarUrl() must return: " + avatarUrl, restProfile.getAvatarUrl(), equalTo(avatarUrl));
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

      assertThat("LikedByIdentity must not be null.", e.getAvailableLikes(), notNullValue());

      RestIdentity identity = e.getAvailableLikes().get(0);
      assertThat("RestProfile must not be null.", identity.getProfile(), notNullValue());

      RestProfile profile = identity.getProfile();
      assertThat(profile.getFullName(), equalTo("Demo GTN"));
      assertThat(profile.getAvatarUrl(), equalTo("http://localhost:8080/profile/u/demo/avatar.jpg?u=12345"));
    }
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

    RestIdentity identity = identityService.get(id);
    assertThat("Identity must not be null", identity, notNullValue());
    assertThat("Identity provider must be organization", identity.getProviderId(), equalTo("organization"));
    assertThat("RemoteId must be demo", identity.getRemoteId(), equalTo("root"));
   
    RestProfile profile = identity.getProfile();
    assertThat("profile must not be null", profile, notNullValue());
    assertThat("profile.getAvatarUrl() must be null", profile.getAvatarUrl(), nullValue());
    assertThat("profile.getFullName() must return: Demo gtn", profile.getFullName(), equalTo("Demo gtn"));
   
    try {
      identity = identityService.get(null);
      fail("Expecting NullPointerException from IdentityService#get(String)");
    } catch (NullPointerException npe) {
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

    }
    RestIdentity restIdentity = identityService.getIdentity("organization", "root");
    assertThat("RestIdentity must not null.", restIdentity, notNullValue());
    assertThat("RemoteId must be root", "root", equalTo(restIdentity.getRemoteId()));
    assertThat("Provider must be organization", "organization", equalTo(restIdentity.getProviderId()));
    RestProfile restProfile = restIdentity.getProfile();
    assertThat("Avatar URL must be null", restProfile.getAvatarUrl(), nullValue());
    assertThat("Profile's full name must be root gtn", "Root Root", equalTo(restProfile.getFullName()));
  }
View Full Code Here

Examples of org.exoplatform.social.client.api.model.RestProfile

    RestIdentity identity = identityService.get(id);
    assertThat("Identity must not be null", identity, notNullValue());
    assertThat("Identity provider must be organization", identity.getProviderId(), equalTo("organization"));
    assertThat("RemoteId must be demo", identity.getRemoteId(), equalTo("root"));

    RestProfile profile = identity.getProfile();
    assertThat("profile must not be null", profile, notNullValue());
    assertThat("profile.getAvatarUrl() must not be null", profile.getAvatarUrl(), notNullValue());
    assertThat("profile.getFullName() must return: Demo gtn", profile.getFullName(), equalTo("Demo gtn"));

    try {
      identity = identityService.get(null);
      fail("Expecting NullPointerException from IdentityService#get(String)");
    } catch (NullPointerException npe) {
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.