Skip to content

Commit 43693fb

Browse files
Nikita Vlaevnikitavlaev
Nikita Vlaev
authored andcommitted
Bring back test class generation (#403)
1 parent 1c01193 commit 43693fb

File tree

1 file changed

+3
-1
lines changed
  • utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator

1 file changed

+3
-1
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/TestGenerator.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ object TestGenerator {
151151
}
152152
}.get()
153153

154-
return if (FileModificationService.getInstance().preparePsiElementForWrite(testClass)) testClass else null
154+
testClass?.let {
155+
return if (FileModificationService.getInstance().preparePsiElementForWrite(it)) it else null
156+
}
155157
}
156158

157159
val fileTemplate = FileTemplateManager.getInstance(testDirectory.project).getInternalTemplate(

0 commit comments

Comments
 (0)