Search in sources :

Example 6 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade 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)

Example 7 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class ShowDiffCommandTest method testExecute_NoContent.

public void testExecute_NoContent() throws Exception {
    final VFile vFile = VFile.create("a file");
    MockUser user = new MockUser() {

        @Override
        public String getVFile(VFile file, IDEFacade ideFacade) {
            assertSame(vFile, file);
            return null;
        }
    };
    myCommand.setUser(user);
    myCommand.setVFile(vFile);
    myCommand.execute();
}
Also used : IDEFacade(jetbrains.communicator.ide.IDEFacade) VFile(jetbrains.communicator.core.vfs.VFile) MockUser(jetbrains.communicator.mock.MockUser)

Example 8 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade 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 9 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class ViewFilesCommandTest method testExecute_WithInformation.

public void testExecute_WithInformation() throws Exception {
    final ProjectsData projectsData = new ProjectsData();
    projectsData.addNonProjectFile(VFile.create("a path"));
    MockUser mockUser = new MockUser("user", null) {

        @Override
        public ProjectsData getProjectsData(IDEFacade ideFacade) {
            return projectsData;
        }
    };
    mockUser.setOnline(true);
    myMockUserListComponent.setSelectedNodes(new User[] { mockUser });
    myFacadeMock.expects(once()).method("showUserFiles").with(eq(mockUser), eq(projectsData));
    myCommand.execute();
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData) IDEFacade(jetbrains.communicator.ide.IDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

Example 10 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class ViewFilesCommandTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myMockUserListComponent = new MockUserListComponent();
    myFacadeMock = mock(IDEFacade.class);
    myCommand = new ViewFilesCommand(myMockUserListComponent, (IDEFacade) myFacadeMock.proxy());
}
Also used : MockUserListComponent(jetbrains.communicator.mock.MockUserListComponent) IDEFacade(jetbrains.communicator.ide.IDEFacade)

Aggregations

IDEFacade (jetbrains.communicator.ide.IDEFacade)13 MockUser (jetbrains.communicator.mock.MockUser)5 UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)3 ProjectsData (jetbrains.communicator.core.vfs.ProjectsData)3 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)3 Mock (org.jmock.Mock)3 VFile (jetbrains.communicator.core.vfs.VFile)2 MockUserListComponent (jetbrains.communicator.mock.MockUserListComponent)2 ConsoleView (com.intellij.execution.ui.ConsoleView)1 Project (com.intellij.openapi.project.Project)1 UserListComponent (jetbrains.communicator.ide.UserListComponent)1 IdeaLocalMessage (jetbrains.communicator.idea.IdeaLocalMessage)1 IncomingCodePointerMessage (jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage)1 OwnConsoleMessage (jetbrains.communicator.idea.messagesWindow.OwnConsoleMessage)1