mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notifications about tests passed/finished in SM runner. Balloon will be shown only if Run/Dubug window isn't active (missed files)
This commit is contained in:
+2
-2
@@ -324,13 +324,13 @@ public class GeneralToSMTRunnerEventsConvertor implements GeneralTestEventsProce
|
||||
|
||||
private void fireOnTestingStarted() {
|
||||
for (SMTRunnerEventsListener listener : myEventsListeners) {
|
||||
listener.onTestingStarted();
|
||||
listener.onTestingStarted(myTestsRootNode);
|
||||
}
|
||||
}
|
||||
|
||||
private void fireOnTestingFinished() {
|
||||
for (SMTRunnerEventsListener listener : myEventsListeners) {
|
||||
listener.onTestingFinished();
|
||||
listener.onTestingFinished(myTestsRootNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author Roman Chernyatchik
|
||||
*/
|
||||
public class SMTRunnerEventsAdapter implements SMTRunnerEventsListener {
|
||||
public void onTestingStarted(){}
|
||||
public void onTestingFinished(){}
|
||||
public void onTestingStarted(@NotNull SMTestProxy testsRoot){}
|
||||
public void onTestingFinished(@NotNull SMTestProxy testsRoot){}
|
||||
public void onTestsCountInSuite(final int count) {}
|
||||
|
||||
public void onTestStarted(@NotNull final SMTestProxy test) {}
|
||||
|
||||
+4
-2
@@ -10,12 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface SMTRunnerEventsListener {
|
||||
/**
|
||||
* On start testing, before tests and suits launching
|
||||
* @param testsRoot
|
||||
*/
|
||||
void onTestingStarted();
|
||||
void onTestingStarted(@NotNull SMTestProxy testsRoot);
|
||||
/**
|
||||
* After test framework finish testing
|
||||
* @param testsRootNode
|
||||
*/
|
||||
void onTestingFinished();
|
||||
void onTestingFinished(@NotNull SMTestProxy testsRoot);
|
||||
/*
|
||||
* Tests count in next suite. For several suites this method will be invoked several times
|
||||
*/
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* @author Roman.Chernyatchik
|
||||
*/
|
||||
public class SMLightFixtureTestCase extends UsefulTestCase {
|
||||
public abstract class SMLightFixtureTestCase extends UsefulTestCase {
|
||||
protected static final LightProjectDescriptor ourDescriptor = new LightProjectDescriptor() {
|
||||
public ModuleType getModuleType() {
|
||||
return ModuleType.EMPTY;
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@ import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerTestTreeView;
|
||||
import com.intellij.execution.testframework.sm.runner.ui.SMTestRunnerResultsForm;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.TreeModel;
|
||||
@@ -249,7 +250,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
final Marker finishedMarker = new Marker();
|
||||
myEventsProcessor.addEventsListener(new SMTRunnerEventsAdapter(){
|
||||
@Override
|
||||
public void onTestingFinished() {
|
||||
public void onTestingFinished(@NotNull SMTestProxy testsRoot) {
|
||||
finishedMarker.set();
|
||||
}
|
||||
});
|
||||
|
||||
+3
-3
@@ -59,12 +59,12 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
|
||||
public void testGetTestsRootNode() {
|
||||
assertNotNull(myTestsRootNode);
|
||||
|
||||
myResultsViewer.onTestingFinished();
|
||||
myResultsViewer.onTestingFinished(myTestsRootNode);
|
||||
assertNotNull(myResultsViewer.getTestsRootNode());
|
||||
}
|
||||
|
||||
public void testTestingStarted() {
|
||||
myResultsViewer.onTestingStarted();
|
||||
myResultsViewer.onTestingStarted(myTestsRootNode);
|
||||
|
||||
assertTrue(myResultsViewer.getStartTime() > 0);
|
||||
assertEquals(0, myResultsViewer.getTestsCurrentCount());
|
||||
@@ -130,7 +130,7 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
|
||||
}
|
||||
|
||||
public void testOnFinishTesting_EndTime() {
|
||||
myResultsViewer.onTestingFinished();
|
||||
myResultsViewer.onTestingFinished(myTestsRootNode);
|
||||
assertTrue(myResultsViewer.getEndTime() > 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user