Skip to content

Commit c42e9f4

Browse files
committed
Improve verification that static mocking is configured
1 parent 1260c8f commit c42e9f4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/GenerateTestsDialogWindow.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,14 +1011,10 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
10111011
.map { f -> Paths.get(urlToPath(f.url)) }
10121012
}
10131013

1014-
return entriesPaths.all { path ->
1015-
if (Files.exists(path)) {
1016-
val fileNames = Files.walk(path).map { it.fileName }.toList()
1017-
fileNames.any { it.toString() == MOCKITO_MOCKMAKER_FILE_NAME }
1018-
} else {
1019-
false
1014+
return entriesPaths.all { entryPath ->
1015+
if (!Files.exists(entryPath)) return false
1016+
Files.walk(entryPath).anyMatch { it.fileName.toString() == MOCKITO_MOCKMAKER_FILE_NAME }
10201017
}
1021-
}
10221018
}
10231019
}
10241020

0 commit comments

Comments
 (0)