Search in sources :

Example 11 with UserModelImpl

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

the class DeleteCommandTest method setUp.

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

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

Example 12 with UserModelImpl

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

the class TestFactory method createUserListWithUsers.

public static UserModel createUserListWithUsers(BaseTestCase test) throws UnknownHostException {
    UserModelImpl result = new UserModelImpl(test.getBroadcaster());
    test.disposeOnTearDown(result);
    result.addUser(new MockUser("aaa", "group1"));
    result.addUser(new MockUser("ccc", "group1"));
    result.addUser(new MockUser("zzz", "group2", true));
    result.addUser(new MockUser("aaaa", "group2"));
    result.addUser(new MockUser("bbb", "group2"));
    Pico.getInstance().registerComponentInstance(UserModel.class, result);
    return result;
}
Also used : UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) MockUser(jetbrains.communicator.mock.MockUser)

Example 13 with UserModelImpl

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

the class EventsProcessorTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myMock = mock(IDEtalkMessagesWindow.class);
    LocalMessageDispatcherImpl localMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), new MockIDEFacade(getClass()), myUserModel);
    disposeOnTearDown(localMessageDispatcher);
    EventsProcessor processor = new EventsProcessor((IDEtalkMessagesWindow) myMock.proxy(), myUserModel, localMessageDispatcher, null);
    disposeOnTearDown(processor);
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) IDEtalkMessagesWindow(jetbrains.communicator.idea.IDEtalkMessagesWindow)

Example 14 with UserModelImpl

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

the class FileAccessProviderTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = new UserModelImpl(getBroadcaster());
    myMock = new Mock(IDEFacade.class);
    disposeOnTearDown(myUserModel);
    myIdeFacade = (IDEFacade) myMock.proxy();
    myUser = myUserModel.createUser("User", MockTransport.NAME);
    myProvider = new MyProvider(myIdeFacade, myUserModel);
}
Also used : UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) Mock(org.jmock.Mock) 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