Package org.apache.shindig.social.core.model

Examples of org.apache.shindig.social.core.model.MessageImpl


    registry.addHandlers(ImmutableSet.<Object>of(handler));
  }

  @Test
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(ImmediateFuture.newInstance((Void) null));
View Full Code Here


  }

  @Test
  @Ignore
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(ImmediateFuture.newInstance((Void) null));
View Full Code Here

  }

  @Test
  @Ignore
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(ImmediateFuture.newInstance((Void) null));
View Full Code Here

  }

  @Test
  @Ignore
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(Futures.immediateFuture((Void) null));
View Full Code Here

  }

  @Test
  @Ignore
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(Futures.immediateFuture((Void) null));
View Full Code Here

  }

  @Test
  public void testCreateMessage() throws Exception {
    // Create a new private message
    Message msg = new MessageImpl();
    msg.setBody("Hello");
    msg.setRecipients(Collections.singletonList(JANE_DOE.getUserId()));
    db.createMessage(JOHN_DOE, APP_ID, "privateMessage", msg, token).get();

    // Check that the message was created
    RestfulCollection<Message> messages = db.getMessages(
        JANE_DOE, "privateMessage",
        Collections.<String>emptySet(), Collections.<String>singletonList(msg.getId()),
        new CollectionOptions(), token).get();
    assertEquals(1, messages.getList().size());
  }
View Full Code Here

    registry.addHandlers(ImmutableSet.<Object>of(handler));
  }

  public void testPostMessage()
      throws ProtocolException, InterruptedException, ExecutionException {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(ImmediateFuture.newInstance((Void) null));
View Full Code Here

    registry.addHandlers(ImmutableSet.<Object>of(handler));
  }

  @Test
  public void testPostMessage() throws Exception {
    MessageImpl message = new MessageImpl("A message body", "A title", Message.Type.PRIVATE_MESSAGE);
    message.setRecipients(recipients);

    EasyMock.expect(converter.convertToObject(null, Message.class)).andReturn(message);
    EasyMock.expect(messageService.createMessage(sender, "messageHandlerTest", "@outbox", message,
        token)).andReturn(ImmediateFuture.newInstance((Void) null));
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.core.model.MessageImpl

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.