use of jetbrains.communicator.mock.MockUser in project intellij-plugins by JetBrains.
the class AsyncMessageDispatcherTest method testAsyncDispatch_Failure.
public void testAsyncDispatch_Failure() throws Exception {
NotifyableMessage mockMessage = new NotifyableMessage(false, myLog);
myDispatcher.sendLater(new MockUser(), mockMessage);
myLog[0] += "Returned";
mockMessage.waitUntilDispatchingStarted();
triggerMessageProcessing(mockMessage);
assertEquals("Should return from method call and than process the message", "ReturnedProcessed", myLog[0]);
assertEquals("Messages should not be delivered", 1, myDispatcher.getUsersWithMessages().length);
}
use of jetbrains.communicator.mock.MockUser in project intellij-plugins by JetBrains.
the class AsyncMessageDispatcherTest method testAsyncDispatch_Success.
public void testAsyncDispatch_Success() throws Exception {
NotifyableMessage mockMessage = new NotifyableMessage(true, myLog);
myDispatcher.sendLater(new MockUser(), mockMessage);
myLog[0] += "Returned";
mockMessage.waitUntilDispatchingStarted();
triggerMessageProcessing(mockMessage);
assertEquals("Should return from method call and than process the message", "ReturnedProcessed", myLog[0]);
assertEquals("Messages should be delivered", 0, myDispatcher.getUsersWithMessages().length);
}
use of jetbrains.communicator.mock.MockUser in project intellij-plugins by JetBrains.
the class OpenFileActionTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myIdeFacadeMock = mock(IDEFacade.class);
Pico.getInstance().registerComponentInstance(IDEFacade.class, myIdeFacadeMock.proxy());
myViewFilesPanel = new ViewFilesPanel(null, null, (IDEFacade) myIdeFacadeMock.proxy());
myUser = new MockUser();
ProjectsData projectsData = new ProjectsData();
myVFile = VFile.create("build.xml");
projectsData.setProjectFiles("ideTalk", new VFile[] { myVFile, VFile.create("log4j.xml") });
projectsData.addNonProjectFile(VFile.create("non-projectFile"));
myViewFilesPanel.refreshData(myUser, projectsData);
myOpenFileAction = new OpenFileAction(myViewFilesPanel.getTree(), (IDEFacade) myIdeFacadeMock.proxy());
}
use of jetbrains.communicator.mock.MockUser in project intellij-plugins by JetBrains.
the class ViewFilesTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
Pico.getInstance().registerComponentInstance(IDEFacade.class, new MockIDEFacade());
myViewFilesPanel = new ViewFilesPanel(null, null, null);
myUser = new MockUser();
}
use of jetbrains.communicator.mock.MockUser in project intellij-plugins by JetBrains.
the class UserListComponentTest method testExpandGroupNodeOnUserAdd.
public void testExpandGroupNodeOnUserAdd() throws Exception {
myUserModel.addGroup("a group");
myUserModel.addUser(new MockUser("user", "a group"));
assertEquals("User group should be expanded", 2, getTree().getRowCount());
}
Aggregations