Skip to content

Commit 4da474f

Browse files
Merge branch 'main' into Vassiliy-Kudryashov/68-ide-fatal-error-during-tests-generation
2 parents a088bda + 52ea0b8 commit 4da474f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsCommand.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class GenerateTestsCommand :
9494
val targetMethods = classUnderTest.targetMethods()
9595
initializeEngine(workingDirectory)
9696

97+
if (targetMethods.isEmpty()) {
98+
throw Exception("Nothing to process. No methods were provided")
99+
}
97100
// utContext is used in `generateTestCases`, `generateTest`, `generateReport`
98101
withUtContext(UtContext(targetMethods.first().clazz.java.classLoader)) {
99102

0 commit comments

Comments
 (0)