do not report "no tests were found" when root is a test itself

This commit is contained in:
anna
2013-04-18 16:29:28 +02:00
parent f3bca281e0
commit 9502ca8933
@@ -74,7 +74,7 @@ public class SMTRunnerNotificationsHandler extends SMTRunnerEventsAdapter {
type = MessageType.ERROR;
break;
case COMPLETE_INDEX:
if (testsRoot.getChildren().size() == 0) {
if (testsRoot.getChildren().size() == 0 && !testsRoot.isLeaf()) {
msg = testsRoot.hasErrors() ? SMTestsRunnerBundle.message("sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found.with.errors")
: testsRoot.isTestsReporterAttached()
? SMTestsRunnerBundle.message("sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found")