use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationStartedThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuckProjectGenerationStartedThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuckProjectGenerationStarted(0);
assertFalse(listener.calledOnWrongThread);
}
use of com.facebook.buck.intellij.ideabuck.test.util.MockTreeModelListener in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestResultsAvailableThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeTestResultsAvailableThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeTestResultsAvailable(0, new MockTestResults());
assertFalse(listener.calledOnWrongThread);
buckEventsConsumer.consumeTestResultsAvailable(1, new MockTestResults());
assertFalse(listener.calledOnWrongThread);
}
Aggregations