You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -43,19 +52,23 @@ class CgInjectingMocksFieldsManager(val context: CgContext) : CgClassFieldManage
43
52
}
44
53
45
54
modelFields?.forEach { (fieldId, fieldModel) ->
46
-
//creating variables for modelVariable fields
55
+
//creating variables for modelVariable fields
47
56
val variableForField = variableConstructor.getOrCreateVariable(fieldModel)
48
57
49
-
// If field model is a mock, it is set in the connected with instance under test automatically via @InjectMocks;
58
+
// is variable mocked by @Mock annotation
59
+
val isMocked = findCgValueByModel(fieldModel, variableConstructor.annotatedModelGroups[mockClassId]) !=null
60
+
61
+
// If field model is a mock model and is mocked by @Mock annotation in classFields, it is set in the connected with instance under test automatically via @InjectMocks;
Copy file name to clipboardExpand all lines: utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgSpringIntegrationTestClassConstructor.kt
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,9 @@ class CgSpringIntegrationTestClassConstructor(
0 commit comments