use of jetbrains.communicator.mock.MockTransport in project intellij-plugins by JetBrains.
the class EventsProcessorTest method testIncomingMessage_No_Tab_WithExpand.
public void testIncomingMessage_No_Tab_WithExpand() throws Exception {
MessageEvent event = EventFactory.createMessageEvent(new MockTransport(), "bob", "text");
myMock.expects(once()).method("expandToolWindow");
myMock.expects(once()).method("newMessageAvailable").with(eq(myUserModel.createUser("bob", MockTransport.NAME)), eq(event));
myMock.expects(once()).method("getWindow").will(returnValue(null));
getBroadcaster().fireEvent(event);
}
use of jetbrains.communicator.mock.MockTransport in project intellij-plugins by JetBrains.
the class CodePointerXmlMessageTest method _test.
private void _test(String text, VFile vFile, CodePointer codePointer) {
Element root = new Element("element");
CodePointerXmlMessage xmlMessage = new CodePointerXmlMessage(text, codePointer, vFile);
xmlMessage.fillRequest(root);
CodePointerEvent event = CodePointerXmlMessage.createEvent(new MockTransport(), "someUser", root);
assertEquals("someUser", event.getRemoteUser());
assertEquals("Wrong code pointer restored", codePointer, event.getCodePointer());
assertEquals(vFile, event.getFile());
}
use of jetbrains.communicator.mock.MockTransport in project intellij-plugins by JetBrains.
the class UserActivityMonitorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myTransport = new MockTransport();
Pico.getInstance().registerComponentInstance(myTransport);
myMonitor = new UserActivityMonitor();
myMonitor.setRefreshInterval(100);
myThread = new Thread(myMonitor, "UserActivityMonitorTest-" + getName());
}
Aggregations