TestResultPresentation (int failedCount, int passedCount, int notStartedCount, int ignoredCount) { if (myRoot == null) { myBalloonText = myTitle = myStarted ? TestRunnerBundle.message("test.interrupted.progress.text") : ExecutionBundle.message("test.not.started.progress.text"); myText = ""; myType = MessageType.WARNING; } else { myFailedCount = failedCount; myPassedCount = passedCount; myNotStartedCount = notStartedCount; myIgnoredCount = ignoredCount; if (failedCount > 0) { myTitle = ExecutionBundle.message("junit.running.info.tests.failed.label"); myBalloonText = TestRunnerBundle.message("tests.failed.0.passed.1.ignored.2.not.started.3", failedCount, passedCount, ignoredCount, ignoredCount > 0 ? 0 : notStartedCount); myText = myComment == null ? TestRunnerBundle.message("0.failed.1.passed.2.ignored.3.not.started", failedCount, passedCount, ignoredCount, ignoredCount > 0 ? 0 : notStartedCount) : TestRunnerBundle.message("0.failed.1.passed.2.ignored.3.not.started.with.comment", failedCount, passedCount, ignoredCount, ignoredCount > 0 ? 0 : notStartedCount, myComment); myType = MessageType.ERROR; } else if (ignoredCount > 0) { myTitle = TestRunnerBundle.message("tests.ignored.error.message"); myBalloonText = TestRunnerBundle.message("tests.ignored.0.passed.1", ignoredCount, passedCount); myText = myComment == null ? TestRunnerBundle.message("0.ignored.1.passed", ignoredCount, passedCount) : TestRunnerBundle.message("0.ignored.1.passed.with.comment", ignoredCount, passedCount, myComment); myType = MessageType.WARNING; } else if (notStartedCount > 0) { myTitle = ExecutionBundle.message("junit.running.info.failed.to.start.error.message"); myBalloonText = TestRunnerBundle.message("failed.to.start.0.passed.1", notStartedCount, passedCount); myText = myComment == null ? TestRunnerBundle.message("0.not.started.1.passed", notStartedCount, passedCount) : TestRunnerBundle.message("0.not.started.1.passed.with.comment", notStartedCount, passedCount, myComment); myType = MessageType.ERROR; } else { myTitle = ExecutionBundle.message("junit.running.info.tests.passed.label"); myBalloonText = TestRunnerBundle.message("tests.passed.0", passedCount); myText = myComment == null ? TestRunnerBundle.message("0.passed", passedCount) : TestRunnerBundle.message("0.passed.with.comment", passedCount, myComment); myType = MessageType.INFO; } } return this; }