Package com.ibm.sbt.services.client.connections.communities

Examples of com.ibm.sbt.services.client.connections.communities.Invite


      String id2 = getProperty("sample.id2");
      if (getEnvironment().isSmartCloud()) {
        displayName2 = getProperty("smartcloud.displayName2");
        id2 = getProperty("smartcloud.id2");
      }
      Invite invite = createInvite(community, id2);
     
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
        addSnippetParam("CommunityService.inviteeUuid", invite.getInviteeUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        String inviteUuid = community.getCommunityUuid() + "-" + invite.getInviteeUuid();
        Assert.assertEquals(inviteUuid, json.getString("inviteUuid"));
    }
View Full Code Here


      String id2 = getProperty("sample.id2");
      if (getEnvironment().isSmartCloud()) {
        displayName2 = getProperty("smartcloud.displayName2");
        id2 = getProperty("smartcloud.id2");
      }
      Invite invite = createInvite(community, id2);
     
        addSnippetParam("CommunityService.communityUuid", "foo");
        addSnippetParam("CommunityService.inviteeUuid", invite.getInviteeUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(500, json.getAsInt("code"));
        Assert.assertEquals("Error generating atom document.", json.getString("message"));
View Full Code Here

      String id2 = getProperty("sample.id2");
      if (getEnvironment().isSmartCloud()) {
        displayName2 = getProperty("smartcloud.displayName2");
        id2 = getProperty("smartcloud.id2");
      }
      Invite invite = createInvite(community, id2);
     
        addSnippetParam("CommunityService.communityUuid", "");
        addSnippetParam("CommunityService.inviteeUuid", invite.getInviteeUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(400, json.getAsInt("code"));
        Assert.assertEquals("Invalid argument, invite with community UUID must be specified.", json.getString("message"));
View Full Code Here

      String id2 = getProperty("sample.id2");
      if (getEnvironment().isSmartCloud()) {
        displayName2 = getProperty("smartcloud.displayName2");
        id2 = getProperty("smartcloud.id2");
      }
      Invite invite = createInvite(community, id2);
     
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
        addSnippetParam("CommunityService.inviteeUuid", "foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
View Full Code Here

      String id2 = getProperty("sample.id2");
      if (getEnvironment().isSmartCloud()) {
        displayName2 = getProperty("smartcloud.displayName2");
        id2 = getProperty("smartcloud.id2");
      }
      Invite invite = createInvite(community, id2);
     
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
        addSnippetParam("CommunityService.inviteeUuid", "");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
View Full Code Here

      return false;
    }
   
    protected Invite createInvite(Community community, String userid) {
      try {
        Invite invite = new Invite(communityService);
        invite.setCommunityUuid(community.getCommunityUuid());
        invite.setUserid(userid);
        return communityService.createInvite(invite);
      } catch (ClientServicesException cse) {
        fail("Error creating invite",cse);
      }
      return null;
View Full Code Here

      if (getEnvironment().isSmartCloud()) {
          name2 = getProperty("smartcloud.displayName2");
          userid2 = getProperty("smartcloud.userId2");
          email2 = getProperty("smartcloud.email2");
      }
        Invite invite = createInvite(community, userid2);
     
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse("Get all invites returned no invites", jsonList.isEmpty());
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.communities.Invite

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.