Examples of shouldCreateNewChat()


Examples of com.calclab.emite.im.chat.ChatProperties.shouldCreateNewChat()

  }

  @Test
  public void shouldInitiateCreationWhenMessageBody() {
    final ChatProperties properties = strategy.extractProperties(new Message("body"));
    assertTrue(properties.shouldCreateNewChat());
  }

  /* Based on real facts ;) */
  @Test
  public void shouldNotInitiateCreationIfMessageHasInvitation() {
View Full Code Here

Examples of com.calclab.emite.im.chat.ChatProperties.shouldCreateNewChat()

    final XMLPacket stanza = XMLBuilder.fromXML("<message to='test1@localhost' " + "from='room@conference.localhost' xmlns='jabber:client' "
        + "type='normal'><x xmlns='http://jabber.org/protocol/muc#user'>" + "<invite from='test1@localhost/emite-1291918896669'><reason />"
        + "</invite></x><x jid='room@conference.localhost' " + "xmlns='jabber:x:conference' />"
        + "<body>test1@localhost/emite-1291918896669 invites you to the room room@conference.localhost</body></message>");
    final ChatProperties properties = strategy.extractProperties(new Message(stanza));
    assertFalse(properties.shouldCreateNewChat());
  }

  @Test
  public void shouldNotInitiateCreationWhenNotBody() {
    final ChatProperties properties = strategy.extractProperties(new Message((String) null));
View Full Code Here

Examples of com.calclab.emite.im.chat.ChatProperties.shouldCreateNewChat()

  }

  @Test
  public void shouldNotInitiateCreationWhenNotBody() {
    final ChatProperties properties = strategy.extractProperties(new Message((String) null));
    assertFalse(properties.shouldCreateNewChat());
  }

}
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.