use of com.intellij.execution.testframework.sm.Marker in project intellij-community by JetBrains.
the class GeneralToSMTRunnerEventsConvertorTest method testOnFinishedTesting_twice.
public void testOnFinishedTesting_twice() {
myEventsProcessor.onFinishTesting();
final Marker finishedMarker = new Marker();
myEventsProcessor.addEventsListener(new SMTRunnerEventsAdapter() {
@Override
public void onTestingFinished(@NotNull SMTestProxy.SMRootTestProxy testsRoot) {
finishedMarker.set();
}
});
myEventsProcessor.onFinishTesting();
assertFalse(finishedMarker.isSet());
}
use of com.intellij.execution.testframework.sm.Marker in project intellij-community by JetBrains.
the class SMTestRunnerResultsFormTest method testChangeSelectionAction.
public void testChangeSelectionAction() {
final Marker onSelectedHappend = new Marker();
final Ref<SMTestProxy> proxyRef = new Ref<>();
final Ref<Boolean> focusRequestedRef = new Ref<>();
myResultsViewer.setShowStatisticForProxyHandler(new PropagateSelectionHandler() {
@Override
public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @NotNull final Object sender, final boolean requestFocus) {
onSelectedHappend.set();
proxyRef.set(selectedTestProxy);
focusRequestedRef.set(requestFocus);
}
});
final SMTestProxy suite = createSuiteProxy("suite", myTestsRootNode);
final SMTestProxy test = createTestProxy("test", myTestsRootNode);
myResultsViewer.onSuiteStarted(suite);
myResultsViewer.onTestStarted(test);
//On test
myResultsViewer.selectAndNotify(test);
myResultsViewer.showStatisticsForSelectedProxy();
assertTrue(onSelectedHappend.isSet());
assertEquals(test, proxyRef.get());
assertTrue(focusRequestedRef.get());
//on suite
//reset markers
onSelectedHappend.reset();
proxyRef.set(null);
focusRequestedRef.set(null);
myResultsViewer.selectAndNotify(suite);
myResultsViewer.showStatisticsForSelectedProxy();
assertTrue(onSelectedHappend.isSet());
assertEquals(suite, proxyRef.get());
assertTrue(focusRequestedRef.get());
}
Aggregations