Search in sources :

Example 1 with TextXmlMessage

use of jetbrains.communicator.core.transport.TextXmlMessage in project intellij-plugins by JetBrains.

the class JabberTransport_ConnectionTest method testSendCustomMessage_WithoutProvider.

public void testSendCustomMessage_WithoutProvider() throws Exception {
    addEventListener();
    myTransport.sendXmlMessage(mySelf, new TextXmlMessage("some text") {

        @Override
        public String getTagNamespace() {
            return "some namespace";
        }
    });
    new WaitFor(TIMEOUT) {

        @Override
        protected boolean condition() {
            return myEvents.size() > 1;
        }
    };
    IDEtalkEvent event = myEvents.get(1);
    assertTrue("Expect message Event for unknown provider", event instanceof MessageEvent);
    assertEquals("Expect message text", "some text", ((MessageEvent) event).getMessage());
}
Also used : WaitFor(jetbrains.communicator.util.WaitFor) IDEtalkEvent(jetbrains.communicator.core.IDEtalkEvent) MessageEvent(jetbrains.communicator.core.transport.MessageEvent) TextXmlMessage(jetbrains.communicator.core.transport.TextXmlMessage)

Aggregations

IDEtalkEvent (jetbrains.communicator.core.IDEtalkEvent)1 MessageEvent (jetbrains.communicator.core.transport.MessageEvent)1 TextXmlMessage (jetbrains.communicator.core.transport.TextXmlMessage)1 WaitFor (jetbrains.communicator.util.WaitFor)1