diff --git a/src/main/kotlin/org/jetbrains/research/testspark/display/TopButtonsPanelFactory.kt b/src/main/kotlin/org/jetbrains/research/testspark/display/TopButtonsPanelFactory.kt index e8a30e1c3..9be757dc0 100644 --- a/src/main/kotlin/org/jetbrains/research/testspark/display/TopButtonsPanelFactory.kt +++ b/src/main/kotlin/org/jetbrains/research/testspark/display/TopButtonsPanelFactory.kt @@ -2,11 +2,9 @@ package org.jetbrains.research.testspark.display import com.intellij.openapi.components.service import com.intellij.openapi.project.Project -import com.intellij.ui.JBColor import org.jetbrains.research.testspark.TestSparkBundle import org.jetbrains.research.testspark.TestSparkLabelsBundle import org.jetbrains.research.testspark.services.TestCaseDisplayService -import org.jetbrains.research.testspark.services.TestsExecutionResultService import java.awt.Dimension import javax.swing.Box import javax.swing.BoxLayout @@ -15,7 +13,6 @@ import javax.swing.JCheckBox import javax.swing.JLabel import javax.swing.JOptionPane import javax.swing.JPanel -import javax.swing.border.MatteBorder class TopButtonsPanelFactory(private val project: Project) { private var runAllButton: JButton = createRunAllTestButton() diff --git a/src/main/kotlin/org/jetbrains/research/testspark/services/TestCaseDisplayService.kt b/src/main/kotlin/org/jetbrains/research/testspark/services/TestCaseDisplayService.kt index fe267bf1a..2b728462e 100644 --- a/src/main/kotlin/org/jetbrains/research/testspark/services/TestCaseDisplayService.kt +++ b/src/main/kotlin/org/jetbrains/research/testspark/services/TestCaseDisplayService.kt @@ -269,17 +269,17 @@ class TestCaseDisplayService(private val project: Project) { WriteCommandAction.runWriteCommandAction(project) { descriptor.withFileFilter { file -> file.isDirectory || ( - file.extension?.lowercase(Locale.getDefault()) == "java" && ( - PsiManager.getInstance(project).findFile(file!!) as PsiJavaFile - ).classes.stream().map { it.name } - .toArray() - .contains( - ( - PsiManager.getInstance(project) - .findFile(file) as PsiJavaFile - ).name.removeSuffix(".java"), - ) + file.extension?.lowercase(Locale.getDefault()) == "java" && ( + PsiManager.getInstance(project).findFile(file!!) as PsiJavaFile + ).classes.stream().map { it.name } + .toArray() + .contains( + ( + PsiManager.getInstance(project) + .findFile(file) as PsiJavaFile + ).name.removeSuffix(".java"), ) + ) } } diff --git a/src/test/kotlin/org/jetbrains/research/testspark/services/CoverageVisualisationServiceTest.kt b/src/test/kotlin/org/jetbrains/research/testspark/services/CoverageVisualisationServiceTest.kt index 0c19ba621..e6af9722a 100644 --- a/src/test/kotlin/org/jetbrains/research/testspark/services/CoverageVisualisationServiceTest.kt +++ b/src/test/kotlin/org/jetbrains/research/testspark/services/CoverageVisualisationServiceTest.kt @@ -91,7 +91,7 @@ class CoverageVisualisationServiceTest : LightJavaCodeInsightFixtureTestCase() { // } fun testCreateToolWindowTabTestSingleContent() { - coverageVisualisationService.showCoverage(Report(CompactReport(TestGenerationResultImpl())), myEditor) + coverageVisualisationService.showCoverage(Report(CompactReport(TestGenerationResultImpl()))) val toolWindow = ToolWindowManager.getInstance(project).getToolWindow("TestSpark")!! // Verify only 1 content is created @@ -99,7 +99,7 @@ class CoverageVisualisationServiceTest : LightJavaCodeInsightFixtureTestCase() { } fun testCreateToolWindowTabTestContent() { - coverageVisualisationService.showCoverage(Report(CompactReport(TestGenerationResultImpl())), myEditor) + coverageVisualisationService.showCoverage(Report(CompactReport(TestGenerationResultImpl()))) val toolWindow = ToolWindowManager.getInstance(project).getToolWindow("TestSpark")!! val content = toolWindow.contentManager.getContent(0)!! assertThat(content.displayName).isEqualTo("Coverage")