Search in sources :

Example 11 with MockIDEFacade

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);
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 12 with MockIDEFacade

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;
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade)

Example 13 with MockIDEFacade

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());
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) Tree(com.intellij.ui.treeStructure.Tree) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl)

Example 14 with MockIDEFacade

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();
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

Example 15 with MockIDEFacade

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);
}
Also used : Project(com.intellij.openapi.project.Project) User(jetbrains.communicator.core.users.User) ConsoleView(com.intellij.execution.ui.ConsoleView) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl) Mock(org.jmock.Mock)

Aggregations

MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)22 UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)8 LocalMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl)6 MockUser (jetbrains.communicator.mock.MockUser)5 Tree (com.intellij.ui.treeStructure.Tree)2 AsyncMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl)2 Mock (org.jmock.Mock)2 ConsoleView (com.intellij.execution.ui.ConsoleView)1 Project (com.intellij.openapi.project.Project)1 TreePath (javax.swing.tree.TreePath)1 AsyncMessageDispatcher (jetbrains.communicator.core.dispatcher.AsyncMessageDispatcher)1 Transport (jetbrains.communicator.core.transport.Transport)1 SettingsChanged (jetbrains.communicator.core.users.SettingsChanged)1 User (jetbrains.communicator.core.users.User)1 UserModel (jetbrains.communicator.core.users.UserModel)1 IDEtalkMessagesWindow (jetbrains.communicator.idea.IDEtalkMessagesWindow)1 JabberUI (jetbrains.communicator.jabber.JabberUI)1 MockJabberFacade (jetbrains.communicator.jabber.register.MockJabberFacade)1 TextAcceptor (jetbrains.communicator.util.TextAcceptor)1 WaitFor (jetbrains.communicator.util.WaitFor)1