use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckBuildProgressUpdateThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckBuildProgressUpdateThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuckBuildProgressUpdate(0, 0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestRunStartedThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestRunStartedThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeTestRunStarted(0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuildStartThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuildStartThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuildStart(0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleProgressUpdateThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleProgressUpdateThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeParseRuleProgressUpdate(0, 0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationFinishedThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationFinishedThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuckProjectGenerationFinished(0);
assertFalse(listener.calledOnWrongThread);
}
Aggregations