use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationProgressThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationProgressThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuckProjectGenerationProgress(0, 0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInAttachThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInAttachThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeConsoleEventThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeConsoleEventThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeConsoleEvent("");
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeInstallFinishedThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeInstallFinishedThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeInstallFinished(0, "");
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestRunCompleteThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestRunCompleteThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeTestRunComplete(0);
assertFalse(listener.calledOnWrongThread);
}
Aggregations