Skip to content

Commit b0fadae

Browse files
committed
Cosmetic improvement
1 parent 78fec3e commit b0fadae

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

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

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -206,33 +206,25 @@ object UtTestsDialogProcessor {
206206
.executeSynchronously()
207207

208208
withStaticsSubstitutionRequired(true) {
209-
val mockFrameworkInstalled = model.mockFramework?.isInstalled ?: true
209+
val mockFrameworkInstalled = model.mockFramework.isInstalled
210210
var forceMockListener: ForceMockListener? = null
211211
var forceStaticMockListener: ForceStaticMockListener? = null
212212

213213
when (model.parametrizedTestSource) {
214-
ParametrizedTestSource.PARAMETRIZE -> {
215-
forceMockListener = ForceMockListener.create(testCaseGenerator, model.conflictTriggers)
216-
forceStaticMockListener = ForceStaticMockListener.create(
217-
testCaseGenerator,
218-
model.conflictTriggers
219-
)
220-
}
221-
222214
ParametrizedTestSource.DO_NOT_PARAMETRIZE -> {
223215
when {
224-
!mockFrameworkInstalled -> forceMockListener = ForceMockListener.create(
225-
testCaseGenerator,
226-
model.conflictTriggers
227-
)
216+
!mockFrameworkInstalled -> forceMockListener =
217+
ForceMockListener.create(testCaseGenerator, model.conflictTriggers)
228218

229-
!model.staticsMocking.isConfigured -> forceStaticMockListener =
230-
ForceStaticMockListener.create(
231-
testCaseGenerator,
232-
model.conflictTriggers
233-
)
219+
!model.staticsMocking.isConfigured ->
220+
forceStaticMockListener = ForceStaticMockListener.create(testCaseGenerator, model.conflictTriggers)
234221
}
235222
}
223+
224+
ParametrizedTestSource.PARAMETRIZE -> {
225+
forceMockListener = ForceMockListener.create(testCaseGenerator, model.conflictTriggers)
226+
forceStaticMockListener = ForceStaticMockListener.create(testCaseGenerator, model.conflictTriggers)
227+
}
236228
}
237229

238230
val notEmptyCases = runCatching {

0 commit comments

Comments
 (0)