Package jetbrains.communicator.core.transport

Examples of jetbrains.communicator.core.transport.TransportEvent


    user.setGroup("some non-default group", myUserModel);
    myUserModel.addUser(user);
    TreeUtils.collapseAll(getTree());
    assertEquals("Sanity check", 1, getTree().getRowCount());

    myBroadcaster.fireEvent(new TransportEvent(transport, "nick"){});
    assertEquals("User group should be expanded to show incoming message icon",
        2, getTree().getRowCount());
  }
View Full Code Here


    MockTransport mockTransport = new MockTransport();

    MockMessage localMessage = new MockMessage();
    MockMessage localMessage1 = new MockMessage();
    myIdeFacade.setReturnedMessage(localMessage);
    getBroadcaster().fireEvent(new TransportEvent(mockTransport, "user"){});

    myIdeFacade.setReturnedMessage(localMessage1);
    getBroadcaster().fireEvent(new TransportEvent(mockTransport, "user"){});

    Message[] pendingMessages = myDispatcher.getPendingMessages(myUser);
    assertEquals("Expect a local localMessages as a result to TransportEvent",
        2, pendingMessages.length);
    assertSame(localMessage, pendingMessages[0]);
View Full Code Here

    LocalMessage outgoingEvent = myFacade.createLocalMessageForOutgoingEvent(event);
    assertTrue(outgoingEvent instanceof OutgoingCodePointerLocalMessage);
  }

  public void testCreateLocalMessage_IncomingMessage() throws Exception {
    TransportEvent event =
        EventFactory.createMessageEvent(myTransport, "user", "comment123");
    Date when = new Date();
    event.setWhen(when.getTime());
    LocalMessage localMessage = myFacade.createLocalMessageForIncomingEvent(event);

    assertTrue("instance of Stacktracelocalmessage expected:" + localMessage.getClass().getName() ,
        localMessage instanceof IncomingLocalMessage);
    assertEquals("comment123", ((BaseLocalMessage) localMessage).getComment());
View Full Code Here

    assertEquals("comment123", ((BaseLocalMessage) localMessage).getComment());
    assertEquals(when, localMessage.getWhen());
  }

  public void testCreateLocalMessage_Stacktrace() throws Exception {
    TransportEvent event =
        EventFactory.createStacktraceEvent(myTransport, "user", "stacktrace", "comment123");
    LocalMessage localMessage = myFacade.createLocalMessageForIncomingEvent(event);

    assertTrue("instance of Stacktracelocalmessage expected",
        localMessage instanceof IncomingStacktraceMessage);
View Full Code Here

        localMessage instanceof IncomingStacktraceMessage);
    assertEquals("comment123", ((BaseLocalMessage) localMessage).getComment());
  }

  public void testCreateLocalMessage_CodeInterval() throws Exception {
    TransportEvent event =
        EventFactory.createCodePointerEvent(myTransport, "user22", VFile.create("a path"), 0, 0, 1, 2, "some comment1");
    LocalMessage localMessage = myFacade.createLocalMessageForIncomingEvent(event);

    assertTrue("instance of IncomingCodePointerMessage expected:" + localMessage,
        localMessage instanceof IncomingCodePointerMessage);
View Full Code Here

TOP

Related Classes of jetbrains.communicator.core.transport.TransportEvent

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.