Search in sources :

Example 6 with MockIDEFacade

use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.

the class UserTreeTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    UserModelImpl userModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(userModel);
    myLocalMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), new MockIDEFacade(getClass()), userModel);
    disposeOnTearDown(myLocalMessageDispatcher);
    myUserTree = new UserTree(myLocalMessageDispatcher) {

        public void treeDidChange() {
            super.treeDidChange();
            myTreeChanged = true;
        }

        protected void invokeSendMessageAction() {
            mySendMessageInvoked = true;
        }
    };
    myUser = new MockUser();
    myTreePath = new TreePath(myUser);
    myTreeChanged = false;
    mySendMessageInvoked = false;
}
Also used : TreePath(javax.swing.tree.TreePath) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) MockUser(jetbrains.communicator.mock.MockUser)

Example 7 with MockIDEFacade

use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.

the class AbstractMessageDispatcherTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myIdeFacade = new MockIDEFacade(getClass());
    myDispatcher = createDispatcher();
    myUser = new MockUser("user", null);
    myUser.setOnline(true);
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

Example 8 with MockIDEFacade

use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.

the class AbstractTransportTestCase method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myIdeFacade = new MockIDEFacade(getClass());
    myUserModel = new UserModelImpl(getBroadcaster());
    myDispatcher = new AsyncMessageDispatcherImpl(getBroadcaster(), myIdeFacade);
    disposeOnTearDown(myUserModel);
    disposeOnTearDown(myDispatcher);
    registerResponseProviders(myUserModel, myIdeFacade);
    myTransport = createTransport();
    mySelf = createSelf();
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) AsyncMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 9 with MockIDEFacade

use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.

the class UserListComponentTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myBroadcaster = getBroadcaster();
    myIdeFacade = new MockIDEFacade(getClass());
    myUserModel = new UserModelImpl(myBroadcaster);
    disposeOnTearDown(myUserModel);
    myLocalMessageDispatcher = new LocalMessageDispatcherImpl(myBroadcaster, myIdeFacade, myUserModel);
    disposeOnTearDown(myLocalMessageDispatcher);
    myUserListComponent = new UserListComponentImpl(myUserModel, myIdeFacade, myLocalMessageDispatcher);
    disposeOnTearDown(myUserListComponent);
    // Emulate the UI change
    getTree().updateUI();
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 10 with MockIDEFacade

use of jetbrains.communicator.mock.MockIDEFacade in project intellij-plugins by JetBrains.

the class AsyncMessageDispatcherTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myIdeFacade = new MockIDEFacade(getClass());
    myUser = new MockUser("user", null);
    myUser.setOnline(true);
    myDispatcher = new AsyncMessageDispatcherImpl(getBroadcaster(), myIdeFacade);
    new WaitFor(1000) {

        @Override
        protected boolean condition() {
            return myDispatcher.isRunning();
        }
    };
    myLog = new String[] { "" };
}
Also used : WaitFor(jetbrains.communicator.util.WaitFor) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

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