Skip to content

Commit f4cc4c1

Browse files
committed
tmp
1 parent 50ea4d8 commit f4cc4c1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ class SpringTestClassModelBuilder(val context: CgContext): TestClassModelBuilder
5757
.forEach { model ->
5858
thisInstanceModels += model.wrap()
5959
thisInstancesDependentModels += collectByThisInstanceModel(model)
60+
61+
}
62+
//TODO: собрать рекурснивно все модели, как в моках, и из них уже выбрать что надо
63+
execution.stateBefore.parameters + setOf(execution.stateBefore.thisInstance)
64+
.filterNotNull()
65+
.forEach { model ->
6066
applicationContextModels += collectApplicationContextModels(model)
6167
}
6268

@@ -153,7 +159,7 @@ class SpringTestClassModelBuilder(val context: CgContext): TestClassModelBuilder
153159
model.modificationsChain.mapNotNull { it.instance }.forEach { innerModels += it }
154160

155161
return innerModels
156-
.filter { it.classId == applicationContextClassId }
162+
.filterIsInstance<UtSpringContextModel>()
157163
.map { it.wrap() }
158164
.toSet()
159165
}

0 commit comments

Comments
 (0)