use of javax.swing.tree.DefaultTreeModel in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuildEndThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeBuildEndThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeBuildEnd(0);
assertFalse(listener.calledOnWrongThread);
}
use of javax.swing.tree.DefaultTreeModel in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleEndThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleEndThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeParseRuleEnd(0);
assertFalse(listener.calledOnWrongThread);
}
use of javax.swing.tree.DefaultTreeModel in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleStartThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeParseRuleStartThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeParseRuleStart(0);
assertFalse(listener.calledOnWrongThread);
}
use of javax.swing.tree.DefaultTreeModel in project buck by facebook.
the class BuckEventsConsumerTest method hasUIWorkBeenDoneOnNonAwtThreadInConsumeCompilerErrorThenFail.
@Test
public void hasUIWorkBeenDoneOnNonAwtThreadInConsumeCompilerErrorThenFail() {
DefaultTreeModel treeModel = new DefaultTreeModel(null);
BuckEventsConsumer buckEventsConsumer = initialiseEventsConsumer();
MockTreeModelListener listener = addListeners(treeModel);
buckEventsConsumer.attach(null, treeModel);
assertFalse(listener.calledOnWrongThread);
assertTrue(buckEventsConsumer.isAttached());
buckEventsConsumer.consumeCompilerError("", 0, "", ImmutableSet.<String>of());
assertFalse(listener.calledOnWrongThread);
}
use of javax.swing.tree.DefaultTreeModel 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);
}
Aggregations