use of jetbrains.communicator.ide.SendMessageEvent in project intellij-plugins by JetBrains.
the class LocalMessageDispatcherTest method testSendMessageEvent.
public void testSendMessageEvent() throws Exception {
MockTransport mockTransport = new MockTransport();
MockMessage localMessage = new MockMessage();
MockMessage localMessage1 = new MockMessage();
myIdeFacade.setReturnedMessage(localMessage);
getBroadcaster().fireEvent(new SendMessageEvent("text", myUser));
myIdeFacade.setReturnedMessage(localMessage1);
getBroadcaster().fireEvent(new SendMessageEvent("text", myUser));
LocalMessage[] history = myDispatcher.getHistory(myUser, null);
assertEquals("Expect localMessages as a result to OwnMessageEvent", 2, history.length);
assertSame(localMessage, history[0]);
assertSame(localMessage1, history[1]);
}
use of jetbrains.communicator.ide.SendMessageEvent in project intellij-plugins by JetBrains.
the class IDEAFacadeTest method testCreateLocalMessage_OutgoingMessage.
public void testCreateLocalMessage_OutgoingMessage() throws Exception {
LocalMessage outgoingEvent = myFacade.createLocalMessageForOutgoingEvent(new SendMessageEvent("message", myUser));
assertTrue(outgoingEvent instanceof OutgoingLocalMessage);
}
Aggregations