use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.
the class LocalMessageDispatcherTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myUserModel = new UserModelImpl(getBroadcaster());
disposeOnTearDown(myUserModel);
myIdeFacade = new MockIDEFacade(getClass());
myDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), myIdeFacade, myUserModel);
myUser = UserImpl.create("user", MockTransport.NAME);
}
use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.
the class PersistentUserModelImplTest method createModelInstance.
private PersistentUserModelImpl createModelInstance() {
PersistentUserModelImpl persistentUserModel = new PersistentUserModelImpl(getBroadcaster(), new MockIDEFacade(myTempDir));
disposeOnTearDown(persistentUserModel);
return persistentUserModel;
}
use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.
the class UsersTreeModel_OnlyOfflineShownTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myUserModel = TestFactory.createUserListWithUsers(this);
myTree = new Tree();
myIDEFacade = new MockIDEFacade(getClass());
myLocalMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), myIDEFacade, myUserModel);
disposeOnTearDown(myLocalMessageDispatcher);
myUsersTreeModel = new UsersTreeModel(myTree, myUserModel, myLocalMessageDispatcher);
disposeOnTearDown(myUsersTreeModel);
myTree.setModel(myUsersTreeModel);
OptionFlag.OPTION_HIDE_OFFLINE_USERS.change(true);
getBroadcaster().fireEvent(new SettingsChanged());
}
use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.
the class ViewFilesTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
Pico.getInstance().registerComponentInstance(IDEFacade.class, new MockIDEFacade());
myViewFilesPanel = new ViewFilesPanel(null, null, null);
myUser = new MockUser();
}
use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.
the class MessagesTabTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myUserMock = mock(User.class);
myUser = (User) myUserMock.proxy();
final Mock consoleStub = mock(ConsoleView.class);
consoleStub.stubs().method(ANYTHING);
consoleStub.stubs().method("getComponent").will(returnValue(new JLabel()));
LocalMessageDispatcherImpl localMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), new MockIDEFacade(getClass()), null);
disposeOnTearDown(localMessageDispatcher);
myMessagesTab = new MessagesTab(null, myUser, localMessageDispatcher, true) {
@Override
protected ConsoleView createConsoleView(Project project) {
return (ConsoleView) consoleStub.proxy();
}
};
disposeOnTearDown(myMessagesTab);
}
Aggregations