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());
}
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();
}
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;
}
};
}
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();
}
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());
}
Aggregations