File tree 1 file changed +10
-0
lines changed
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ import org.utbot.common.filterWhen
54
54
import org.utbot.engine.util.mockListeners.ForceStaticMockListener
55
55
import org.utbot.framework.plugin.api.testFlow
56
56
import org.utbot.intellij.plugin.settings.Settings
57
+ import org.utbot.intellij.plugin.ui.utils.suitableTestSourceRoots
57
58
import org.utbot.intellij.plugin.util.isAbstract
58
59
import kotlin.reflect.KClass
59
60
import kotlin.reflect.full.functions
@@ -89,6 +90,15 @@ object UtTestsDialogProcessor {
89
90
return null
90
91
}
91
92
93
+ if (testModule.suitableTestSourceRoots().isEmpty()) {
94
+ val errorMessage = """
95
+ No test source roots found in the project.
96
+ Please, create or configure at least one test source root.
97
+ """ .trimIndent()
98
+ showErrorDialogLater(project, errorMessage, " Test source roots not found" )
99
+ return null
100
+ }
101
+
92
102
return GenerateTestsDialogWindow (
93
103
GenerateTestsModel (
94
104
project,
You can’t perform that action at this time.
0 commit comments