Search in sources :

Example 6 with UserModelImpl

use of jetbrains.communicator.core.impl.users.UserModelImpl 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 7 with UserModelImpl

use of jetbrains.communicator.core.impl.users.UserModelImpl 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 8 with UserModelImpl

use of jetbrains.communicator.core.impl.users.UserModelImpl 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 9 with UserModelImpl

use of jetbrains.communicator.core.impl.users.UserModelImpl in project intellij-plugins by JetBrains.

the class P2PTransportTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myIdeFacade = new MockIDEFacade(getClass());
    myIdeFacade.setReturnedProjects(new String[] { PROJECT_NAME });
    myDispatcher = new AsyncMessageDispatcherImpl(getBroadcaster(), myIdeFacade);
    disposeOnTearDown(myDispatcher);
    myTransport = new P2PTransport(myDispatcher, myUserModel, WAIT_USER_RESPONSES_TIMEOUT) {

        @Override
        protected void sendUserAddedCallback(User user) {
            super.sendUserAddedCallback(user);
            myLog += "sendUserAddedCallback" + user;
        }
    };
    Pico.getInstance().registerComponentInstance(myTransport);
    myLog = "";
    myProjectLevelContainer = Pico.getInstance().makeChildContainer();
}
Also used : MockUser(jetbrains.communicator.mock.MockUser) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) AsyncMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 10 with UserModelImpl

use of jetbrains.communicator.core.impl.users.UserModelImpl in project intellij-plugins by JetBrains.

the class SendMessageCommandTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myMockUserListComponent = new MockUserListComponent();
    myFacadeMock = mock(IDEFacade.class);
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myCommand = new SendMessageCommand(myUserModel, myMockUserListComponent, (IDEFacade) myFacadeMock.proxy());
}
Also used : UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) MockUserListComponent(jetbrains.communicator.mock.MockUserListComponent) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) IDEFacade(jetbrains.communicator.ide.IDEFacade)

Aggregations

UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)14 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)9 LocalMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl)3 IDEFacade (jetbrains.communicator.ide.IDEFacade)3 MockUser (jetbrains.communicator.mock.MockUser)3 AsyncMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl)2 UserListComponent (jetbrains.communicator.ide.UserListComponent)2 JabberUI (jetbrains.communicator.jabber.JabberUI)2 Mock (org.jmock.Mock)2 TreePath (javax.swing.tree.TreePath)1 AsyncMessageDispatcher (jetbrains.communicator.core.dispatcher.AsyncMessageDispatcher)1 IDEtalkMessagesWindow (jetbrains.communicator.idea.IDEtalkMessagesWindow)1 JabberFacade (jetbrains.communicator.jabber.JabberFacade)1 MockJabberFacade (jetbrains.communicator.jabber.register.MockJabberFacade)1 MockUserListComponent (jetbrains.communicator.mock.MockUserListComponent)1