use of com.facebook.buck.intellij.ideabuck.test.util.MockTestResults 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