Search in sources :

Example 1 with UserModelImpl

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

the class JabberTransportTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myFacade = new MockJabberFacade();
    myUIMock = mock(JabberUI.class);
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    Mock dispatcherMock = mock(AsyncMessageDispatcher.class);
    myIDEFacade = new MockIDEFacade();
    dispatcherMock.stubs().method("getIdeFacade").will(returnValue(myIDEFacade));
    myTransport = new JabberTransport((JabberUI) myUIMock.proxy(), myFacade, myUserModel, (AsyncMessageDispatcher) dispatcherMock.proxy(), null);
    disposeOnTearDown(myTransport);
    myProjectContainer = Pico.getInstance().makeChildContainer();
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) AsyncMessageDispatcher(jetbrains.communicator.core.dispatcher.AsyncMessageDispatcher) MockJabberFacade(jetbrains.communicator.jabber.register.MockJabberFacade) JabberUI(jetbrains.communicator.jabber.JabberUI) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) Mock(org.jmock.Mock)

Example 2 with UserModelImpl

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

the class JabberUserFinderTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myFacade = new MockIDEFacade(getClass());
    myFacade.setReturnedProjectId("33333");
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myUserFinder = new JabberUserFinderImpl(myFacade, myUserModel);
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 3 with UserModelImpl

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

the class FindByJabberIdCommandTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myJabberFacade = mock(JabberFacade.class);
    myJabberUI = mock(JabberUI.class);
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myCommand = new FindByJabberIdCommand((JabberFacade) myJabberFacade.proxy(), (JabberUI) myJabberUI.proxy(), myUserModel);
    assertNotNull(myCommand.getName());
    assertTrue(myCommand.isEnabled());
}
Also used : JabberFacade(jetbrains.communicator.jabber.JabberFacade) JabberUI(jetbrains.communicator.jabber.JabberUI) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 4 with UserModelImpl

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

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

the class ToggleFileAccessCommandTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserListComponent = mock(UserListComponent.class);
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myCommand = new ToggleFileAccessCommand(myUserModel, (UserListComponent) myUserListComponent.proxy()) {

        @Override
        protected boolean isFocused() {
            return true;
        }
    };
}
Also used : UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) UserListComponent(jetbrains.communicator.ide.UserListComponent)

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