Search in sources :

Example 1 with JabberUI

use of jetbrains.communicator.jabber.JabberUI 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 JabberUI

use of jetbrains.communicator.jabber.JabberUI 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 3 with JabberUI

use of jetbrains.communicator.jabber.JabberUI in project intellij-plugins by JetBrains.

the class JabberTransport_ConnectionTest method createTransport.

@Override
protected Transport createTransport() {
    myFacade = new JabberFacadeImpl(myIdeFacade);
    myUserFinder = new MockUserFinder();
    Mock mockUI = createJabberUIMock();
    myTransport = new JabberTransport((JabberUI) mockUI.proxy(), myFacade, myUserModel, myDispatcher, myUserFinder) {

        @Override
        public void synchronizeRoster(boolean removeUsersNotInRoster) {
            super.synchronizeRoster(removeUsersNotInRoster);
            myUsersSynchronized = true;
        }
    };
    Pico.getInstance().registerComponentInstance(myTransport);
    disposeOnTearDown(myFacade);
    disposeOnTearDown(myTransport);
    return myTransport;
}
Also used : JabberUI(jetbrains.communicator.jabber.JabberUI) Mock(org.jmock.Mock)

Aggregations

JabberUI (jetbrains.communicator.jabber.JabberUI)3 UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)2 Mock (org.jmock.Mock)2 AsyncMessageDispatcher (jetbrains.communicator.core.dispatcher.AsyncMessageDispatcher)1 JabberFacade (jetbrains.communicator.jabber.JabberFacade)1 MockJabberFacade (jetbrains.communicator.jabber.register.MockJabberFacade)1 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)1